:root{
    --base-blue: #0052FF;
    --base-blue-light: #3D7FFF;
    --base-blue-dark: #0039CC;
    --base-green:  #35D07F;
    --bg: #f6faf7;
    --card: #ffffff;
    --muted: #6b6b6b;
    --rounded: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif;
}

html,body{
    height:100%; 
    margin:0; 
    background:var(--bg); 
    color:#0b1720;
}

.header {
    background: linear-gradient(90deg, var(--base-blue), var(--base-blue-dark));
    color: white;
    padding:18px 30px;
    border-radius:0 0 12px 12px;
    display:flex;
    align-items:center;
    gap:16px;
}

.brand { 
    display:flex; 
    gap:12px; 
    align-items:center; 
}

.title { 
    font-size:1.2rem; 
    font-weight:700; 
    display: flex;
    align-items: center;
    gap: 8px;
}

.base-symbol {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.byline { 
    margin-left:auto; 
    font-size:13px; 
    font-weight: 700;
}

.container {
    max-width:1000px;
    margin: 6px auto 60px auto;
    padding: 0 18px;
    display:grid;
    grid-template-columns: 1fr 420px;
    gap:20px;
    align-items:start;
}

.left, .right {
    background:var(--card);
    border-radius:var(--rounded);
    padding:24px;
    box-shadow: 0 6px 20px rgba(10,20,20,0.05);
}

.left h2, .right h2 { 
    margin:0 0 16px 0; 
    font-size:1.2rem; 
    color: #052017;
}

.counter-section {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(180deg,#ffffff,#fbfefb);
    border-radius: 10px;
    border: 1px solid rgba(11,21,20,0.06);
}

.counter-value {
    font-size: 4rem;
    font-weight: 700;
    margin: 20px 0;
    color: #052017;
    background: linear-gradient(135deg, var(--base-blue), var(--base-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.button-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.connect-btn, .increase-btn, .switch-btn {
    background: linear-gradient(180deg, var(--base-blue-light), var(--base-blue));
    color:white;
    border:none;
    padding:12px 20px;
    border-radius:10px;
    font-weight:700;
    cursor:pointer;
    font-size: 14px;
    min-width: 140px;
    transition: all 0.2s ease;
}

.connect-btn:hover, .increase-btn:hover, .switch-btn:hover { 
    opacity:0.95; 
    transform:translateY(-1px); 
}

.connect-btn:disabled, .increase-btn:disabled { 
    opacity:0.6; 
    cursor:not-allowed; 
    transform: none;
}

.wallet-row { 
    display:flex; 
    gap:12px; 
    align-items:center; 
    margin-bottom:16px; 
}

.wallet-info {
    font-size:13px;
    color:var(--muted);
    word-break:break-all;
    background: rgba(5,32,24,0.03);
    padding:12px;
    border-radius:8px;
    flex:1;
}

.status {
    padding:8px 12px;
    font-weight:600;
    font-size:12px;
    border-radius:999px;
    text-align: center;
    margin-bottom: 16px;
}

.status.connected { 
    background: rgba(0,82,255,0.12); 
    color: var(--base-blue); 
}

.status.disconnected { 
    background: rgba(255,200,92,0.12); 
    color: #b26a00; 
}

.contract-info {
    background: rgba(0,82,255,0.1);
    border: 1px solid rgba(0,82,255,0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--muted);
}

.info-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
}

.info-icon {
    width: 16px;
    height: 16px;
    background: var(--base-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    position: relative;
}

.info-tooltip {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid rgba(11,21,20,0.1);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    width: 300px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--muted);
    top: 100%;
    left: 0;
    margin-top: 8px;
}

.info-icon:hover .info-tooltip {
    display: block;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal h3 {
    margin-bottom: 12px;
    color: #052017;
}

.modal p {
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.tx-link {
    color: var(--base-blue);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

.tx-link:hover {
    text-decoration: underline;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: var(--base-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.success-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--base-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

@media (max-width: 768px) {
    .container { 
        grid-template-columns: 1fr; 
        gap: 16px; 
    }
    .header { 
        padding: 14px 20px; 
    }
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    .connect-btn, .increase-btn {
        width: 100%;
        max-width: 250px;
    }
    .counter-value {
        font-size: 3rem;
    }
    .info-tooltip {
        width: 250px;
        left: -100px;
    }
}
