:root {
    --bg-dark: #22362e;
    --card-bg: #0d836f96; 
    --primary: #05da7d;
    --primary-dim: rgba(255, 255, 255, 0.15);
    --accent-orange: #e92020; 
    --text-main: #f0fdf4;
    --text-muted: #459e66;
    --border: rgba(75, 216, 174, 0.3);
    --neon: 0 0 15px rgba(0, 255, 136, 0.466);
    --error: #ef4444;
}

* { margin: 0;
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}


body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex; flex-direction: column;
    background-image: linear-gradient(rgba(0, 255, 136, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    overflow-x: hidden;
}

/* --- HEADER --- */
header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 15px 5%; 
    border-bottom: 1px solid var(--border);
    background: rgba(20, 58, 68, 0.9); 
    backdrop-filter: blur(10px);
    position: sticky; 
    top: 0; 
    z-index: 100;
}

.brand { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-weight: 900;
    font-size: 1.4rem; 
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0,255,136,0.5); 
    white-space: nowrap;
}
.logo-icon { 
    width: 35px; 
    height: 35px; 
    background: linear-gradient(135deg, #00ff88, #059669); 
    border-radius: 50%; display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #000;
    box-shadow: var(--neon); 
    flex-shrink: 0; 
}

.wallet-info { 
    display: flex; 
    align-items: center; 
    min-width: 0; 
    justify-content: flex-end;
    gap: 10px;
}

/* NETWORK SWITCHER */
.network-switcher { position: relative; display: inline-block; }
.network-select { background: rgba(0, 255, 136, 0.05); border: 1px solid var(--primary); color: var(--primary); padding: 8px 12px; border-radius: 8px; font-weight: 700; outline: none; text-align: center; font-size: 0.9rem; cursor: pointer; min-width: 80px; }
.network-dropdown-content { display: none; position: absolute; top: 100%; right: 0; z-index: 100; min-width: 100%; margin-top: 5px; background-color: #121212; border: 1px solid var(--primary); border-radius: 8px; overflow: hidden; }
.network-dropdown-content button { text-align: center; width: 100%; padding: 10px 15px; background: none; border: none; color: #fff; cursor: pointer; font-weight: 700; font-size: 0.9rem; transition: background-color 0.2s; }
.network-dropdown-content button:hover { background-color: rgba(0, 255, 136, 0.1); color: var(--primary); }
.network-dropdown-content.show { display: block; }

.btn-connect {
    background: transparent; 
    color: var(--primary); 
    border: 2px solid var(--primary);
    padding: 8px 16px; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s;
    font-size: 0.9rem; 
    white-space: nowrap;
}
.btn-connect:hover { background: var(--primary); color: #000; box-shadow: var(--neon); }
.btn-connect.connected { border-color: var(--primary); color: #fff; background: rgba(0, 255, 136, 0.1); }
.btn-connect.connected:hover { background: var(--error); border-color: var(--error); color: #fff; content: "Disconnect"; }

/* --- MAIN LAYOUT --- */
main { 
    flex: 1;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 40px; 
    padding: 40px 15px; 
    width: 100%; 
    max-width: 950px; 
    margin: 0 auto; 
}

h2 { color: #fff; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
    font-size: 1.4rem;
     font-weight: 800; 
     display: flex; 
     align-items: center; 
     gap: 10px; 
}

h2 i { color: var(--primary); }

.card {
    background: var(--card-bg); 
    border: 1px solid var(--border);
    padding: 30px; 
    border-radius: 20px; 
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    position: relative; 
    overflow: hidden;
    text-align: center; 
}
.card::before {
    content: ''; position: absolute; 
    top:0; left:0; 
    width:100%; 
    height:6px;
    background: linear-gradient(90deg, var(--primary), #004422);
    box-shadow: 0 0 10px var(--primary);
}
.card h2, .card .stats-grid, .card .input-group, .card .user-stakes-container, .card .staking-plans {
    text-align: left;
}
.card .staking-calculator {
    text-align: initial;
}

.stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; margin-bottom: 20px; 
}
.stat-box { 
    background: rgba(0,0,0,0.4); 
    border: 1px solid #333; 
    border-radius: 12px; 
    padding: 15px; 
    text-align: center; 
    display: flex; 
    flex-direction: column;
    gap: 5px; 
}
.stat-label {
     font-size: 0.75rem; 
     color: var(--primary); 
     font-weight: 700; 
     letter-spacing: 1px; 
     text-transform: uppercase; 
}
.stat-value { 
    font-size: 1.1rem; 
    color: var(--accent-orange); 
    font-family: monospace; 
    font-weight: bold; 
    text-shadow: 0 0 5px rgba(255, 159, 67, 0.3); 
}

.input-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: var(--primary); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    text-align: left;
}
.input-wrapper { 
    display: flex; 
    align-items: center; 
    background: #020b05; 
    border: 1px solid #333; 
    border-radius: 10px; 
    padding-right: 15px; 
    transition: 0.3s; 
    position: relative; 
}
.input-wrapper:focus-within { 
    border-color: var(--primary);
     box-shadow: 0 0 10px rgba(0,255,136,0.1); 
}
input { 
    width: 100%; 
    background: transparent; 
    border: none; 
    padding: 18px; 
    color: #fff; 
    font-size: 1.3rem; 
    font-family: monospace; 
    outline: none; 
}
.currency { 
    font-weight: 900; 
    color: var(--primary); 
    font-size: 1.2rem; 
}

.btn-max {
    background: rgba(0, 255, 136, 0.15); 
    color: var(--primary); 
    border: 1px solid var(--primary);
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    cursor: pointer;
    margin-right: 10px; 
    transition: 0.2s;
}

.btn-max:hover { background: var(--primary); color: #000; }

.btn-claim { 
    padding: 10px; 
    width: 100%; 
    background: transparent;
    border: 1px solid var(--primary); 
    color: var(--primary); 
    border-radius: 6px; 
    font-weight: 700; 
    cursor: pointer; 
    margin-top: 5px; 
}

.btn-claim:hover { background: var(--primary); color: #000; }
.btn-claim:disabled { border-color: #444; color: #555; background: transparent; cursor: not-allowed; }
.btn-mint-nft[disabled] {cursor: default !important; }
.btn-mint-nft {cursor: pointer;}


.btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif; /* Или ваш основной шрифт */
    font-size: 14px;
    font-weight: 500;
    color: #e92020; /* Темно-серый */
    background-color: #172222; /* Светло-серый */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
  }
  
  .btn-close:hover {
    background-color: #05da7d;
    color: #111827;
    border-color: #ee0e0e;
  }
  
  .btn-close:active {
    transform: scale(0.96); /* Эффект нажатия */
  }
  
  .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(91, 154, 184, 0.2);
  }

/* --- WALLET MONITOR --- */
.wallet-monitor { 
    display: flex; 
    align-items: center; 
    background: rgba(6, 31, 20, 0.8); 
    border: 1px solid rgba(0, 255, 136, 0.3); 
    border-radius: 12px; 
    padding: 5px 15px; 
    margin-right: 10px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(5px); height: 42px; 
}
.balance-group { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: flex-end; 
    line-height: 1.1; 
}
.balance-label { 
    font-size: 0.65rem; 
    color: #86efac; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.balance-value { 
    font-family: 'Inter', monospace; 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #fff; 
    white-space: nowrap; 
}
.mcf-group .balance-value { 
    color: #00ff88; 
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4); 
}
.balance-divider { width: 1px; 
    height: 24px; 
    background: rgba(255, 255, 255, 0.15); 
    margin: 0 12px; 
}

/* --- SPACE BUTTON STYLES --- */
.button-container {
    position: relative;
    display: inline-block; 
    max-width: 100%; 
    padding: 2px; 
    border-radius: 14px;
    margin-top: 25px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, #00ff88, #004422, #059669, #00ff88);
    background-size: 400% 400%;
    animation: gradientBorder 10s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
    transform: translateZ(0);
    will-change: transform;
}

.space-button {
    position: relative;
    width: 100%; 
    padding: 18px 40px; 
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(45deg, #020b05, #0a1f16);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.05);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
}

.space-button span {
    position: relative;
    z-index: 5;
    background: linear-gradient(to bottom, #ffffff, #ccffdd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.5));
}

.space-button::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 85% 25%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(0,255,136,0.8), transparent); 
    animation: moveParticles1 20s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    z-index: 2;
}

.space-button::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: inherit;
    animation: moveParticles2 18s linear infinite;
    transform: rotate(25deg);
    opacity: 0.3;
    pointer-events: none;
    z-index: 3;
}

.space-button:hover {
    background: linear-gradient(45deg, #061f14, #00331a);
    box-shadow: inset 0 0 30px rgba(0, 255, 136, 0.2);
}

.button-container:hover {
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
}

.space-button:disabled {
    background: #111;
    cursor: not-allowed;
    opacity: 0.7;
}

.space-button .bright-particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(2px 2px at 15% 25%, rgba(255,255,255,1), transparent),
        radial-gradient(1.8px 1.8px at 85% 15%, rgba(0,255,136,0.9), transparent),
        radial-gradient(2.2px 2.2px at 65% 35%, rgba(255,255,255,0.8), transparent);
    animation: moveParticles4 15s linear infinite;
    opacity: 0.6;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 4;
}

@keyframes moveParticles1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, 10px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}
@keyframes moveParticles2 {
    0% { transform: translate(0, 0) rotate(20deg); }
    100% { transform: translate(0, 0) rotate(380deg); }
}
@keyframes moveParticles4 {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, 20px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}
@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.staking-plans { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    margin-bottom: 20px; 
}
.plan-card { 
    background: rgba(0,0,0,0.4); 
    border: 1px solid #333; 
    border-radius: 10px; 
    padding: 15px 5px; 
    text-align: center; 
    cursor: pointer; 
    transition: 0.3s; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    position: relative; 
}
.plan-card.selected { 
    border-color: var(--primary); 
    background: var(--primary-dim); 
    box-shadow: inset 0 0 10px rgba(0,255,136,0.1); 
}
.plan-duration { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    font-weight: 700; 
}
.plan-apy { font-size: 1.2rem; color: #fff; font-weight: 900; }

.staking-calculator { 
    background: rgba(0,255,136,0.05); 
    padding: 15px; 
    border-radius: 10px; 
    margin-top: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border: 1px dashed var(--border); 
}
.calc-val { 
    font-size: 1.2rem; 
    color: var(--primary); 
    font-weight: bold; 
    font-family: monospace; 
}

.user-stakes-container {
     margin-top: 30px; 
     border-top: 1px solid #333; 
     padding-top: 20px; 
    }
.stake-row {
    background: rgba(0,0,0,0.6); 
    border: 1px solid #333; 
    border-radius: 10px; 
    padding: 15px; 
    margin-bottom: 10px;
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}
.stake-header { 
    display: flex; 
    justify-content: space-between; 
    color: #fff; 
    font-weight: bold; 
}

.nft-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 25px; 
    width: 100%; 
    perspective: 1000px; 
}
.nft-card { 
    background: #0d836f96;
    border: 1px solid var(--border); 
    border-radius: 16px; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    transition: transform 0.4s ease, box-shadow 0.4s ease; 
    transform-style: preserve-3d; 
}
@media (min-width: 769px) { 
    .nft-card:hover { 
        transform: translateY(-10px) rotateX(5deg) rotateY(2deg); 
        box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2); 
        border-color: var(--primary); 
        z-index: 10; 
    } 
}
.nft-image-container { 
    width: 100%; 
    aspect-ratio: 1/1; 
    background: #000; 
    border-radius: 150px; 
    overflow: hidden; 
    margin-bottom: 12px; 
    border: 1px solid #333; 
}
.nft-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }

/* --- MOBILE ADAPTATION --- */
@media (max-width: 768px) {
    header { 
        flex-direction: column; 
        gap: 10px; 
        padding: 10px 15px; 
    }
    .brand { 
        width: 100%; 
        justify-content: center; 
        margin-bottom: 5px; 
    }
    .wallet-info { 
        width: 100%; 
        justify-content: space-between; 
        gap: 5px; 
    }
    .wallet-monitor { 
        padding: 4px 8px; 
        margin: 0; 
        height: 36px; 
        flex-grow: 1; 
        justify-content: space-around; 
    }
    .balance-label { 
        display: none; 
    } 
    .balance-value { 
        font-size: 0.8rem; 
    }
    .network-select, .btn-connect { 
        padding: 6px 8px; 
        font-size: 0.75rem; 
        height: 36px; 
        min-width: auto; 
    }
    main { 
        padding: 20px 10px; 
        gap: 20px; 
    }
    .staking-plans {
        grid-template-columns: 1fr 1fr; 
        gap: 8px; 
    }
    .nft-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .button-container { width: 100%; }
    .space-button { font-size: 1rem; padding: 15px 10px; }
}

/* --- MODAL --- */
.modal-overlay {
     position: fixed; 
     top: 0; 
     left: 0; 
     width: 100%; 
     height: 100%; 
     background: rgba(0, 0, 0, 0.9); 
     z-index: 2000; 
     display: none; 
     align-items: center; 
     justify-content: center; 
     backdrop-filter: blur(5px); 
    }

.modal-content { 
    background: #0d836f96;
    border: 1px solid var(--primary); 
    padding: 30px;
    border-radius: 16px; 
    width: 90%; 
    max-width: 360px; 
    text-align: center; 
}

.spinner { 
    width: 40px; 
    height: 40px; 
    border: 4px solid rgba(0,255,136,0.1); 
    border-top-color: var(--primary); 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    margin: 0 auto 15px; 
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- FOOTER --- */
footer { 
    border-top: 1px solid #333;
     padding: 40px 20px; 
     background: rgba(2, 4, 2, 0.568); 
     margin-top: auto; 
     display: flex; 
     flex-direction: column; 
     align-items: center; 
     gap: 20px; 
    }
.footer-socials {
     display: flex; 
     gap: 20px; 
     flex-wrap: wrap; 
     justify-content: center; 
    }
.social-btn { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 12px 25px; 
    background: rgba(20, 22, 20, 0.37); 
    border: 1px solid var(--primary); 
    border-radius: 30px; 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 700; 
    transition: 0.3s; 
    text-transform: uppercase; 
}
.social-btn:hover { 
    background: var(--primary); 
    color: #000; 
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6); 
    transform: translateY(-3px); 
}



.header-garland {
    display: flex;
    justify-content: space-around;
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
}

.header-garland i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 5px #fff;
    animation: blink 1.5s infinite;
}



/* Новогоднее украшение */


#snowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Чтобы снег был за контентом */
    pointer-events: none; /* Чтобы снег не мешал кликам */
    background: linear-gradient(to bottom, #0d1b20, #275157, #36718a); /* Темный зимний градиент */
}


/* Чередуем цвета огней */
.header-garland i:nth-child(odd) { background: #f3042c; box-shadow: 0 0 8px #3ab9f3; } /* Голубой */
.header-garland i:nth-child(even) { animation-delay: 0.5s; background: #05df60; } /* Мятный */

@keyframes blink {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}


.lucide-badge-check {
    fill: rgb(23, 126, 245); /* Легкая заливка внутри */
    stroke: #e9e50b; /* Яркий контур */
    stroke-width: 2.5px; /* Немного увеличим толщину для четкости */
}

.santa-hat {
    position: absolute;
    font-size: 18px;
    top: -12px; /* Подберите под размер иконки */
    left: -8px;
    transform: rotate(-20deg);
    user-select: none;
    pointer-events: none;
}
