/* ===== RESET & VARIABLES ===== */
:root {
    --primary: #3361FF;
    --primary-dark: #2952E0;
    --primary-light: #5A7FFF;
    --bg-dark: #0B0F1C;
    --bg-card: #131A2C;
    --bg-card-hover: #1A2338;
    --text-primary: #FFFFFF;
    --text-secondary: #8F9BB3;
    --text-muted: #5E6A86;
    --border-color: #1E293B;
    --success: #00C853;
    --warning: #FFB800;
    --danger: #FF3B3B;
    
    --gradient: linear-gradient(135deg, #3361FF 0%, #5A7FFF 100%);
    --gradient-hover: linear-gradient(135deg, #2952E0 0%, #4A6FE0 100%);
    
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(51, 97, 255, 0.3);
    --border-glow: 0 0 10px rgba(51, 97, 255, 0.2);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(51, 97, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== HEADER ===== */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(11, 15, 28, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.badge {
    background: rgba(51, 97, 255, 0.1);
    color: var(--primary-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(51, 97, 255, 0.2);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

/* ===== MAIN CARD ===== */
.main {
    padding: 40px 0 60px;
}

.claim-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(circle at 50% 0%, rgba(51, 97, 255, 0.2), transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.card-content {
    position: relative;
    padding: 40px;
    z-index: 1;
}

.status-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.status-icon svg {
    filter: drop-shadow(0 0 20px rgba(51, 97, 255, 0.5));
}

.title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #FFFFFF 0%, #B0C4FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== AMOUNT DISPLAY ===== */
.amount-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.amount-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.amount-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.amount-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.amount-number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, #B0C4FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.amount-currency {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount-hint {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== STEPS ===== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--border-glow);
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 10px;
}

/* ===== WALLET SECTION ===== */
.wallet-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-size: 13px;
}

.connect-btn, .approve-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.connect-btn {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(51, 97, 255, 0.3);
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(51, 97, 255, 0.4);
}

.connect-btn:active {
    transform: translateY(0);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wallet-info {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.wallet-address, .wallet-balance {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wallet-address span:first-child,
.wallet-balance span:first-child {
    color: var(--text-secondary);
}

/* ===== APPROVE SECTION ===== */
.approve-section {
    margin-top: 20px;
}

.approve-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.highlight {
    color: var(--primary-light);
    font-weight: 600;
}

.approve-btn {
    background: var(--gradient);
    color: white;
    margin-bottom: 16px;
}

.warning-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 184, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    color: var(--warning);
    font-size: 14px;
}

/* ===== TIMER ===== */
.timer-section {
    text-align: center;
    margin: 30px 0;
}

.timer-label {
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.timer {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Inter', monospace;
    color: var(--primary-light);
    text-shadow: 0 0 20px rgba(51, 97, 255, 0.3);
}

/* ===== SOCIAL PROOF ===== */
.social-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.proof-item {
    text-align: center;
}

.proof-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.proof-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== TRUST SECTION ===== */
.trust-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.trust-item svg {
    opacity: 0.7;
}

/* ===== FOOTER ===== */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

/* ===== НОВЫЕ СТИЛИ (ДОБАВЛЕНЫ) ===== */

/* ===== ERROR CARD ===== */
.error-card {
    text-align: center;
    padding: 60px 40px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.error-card h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.error-hint {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== TARGET ADDRESS ===== */
.target-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(51, 97, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(51, 97, 255, 0.2);
    color: var(--primary-light);
    font-size: 14px;
}

/* ===== CUSTOM LOADER ===== */
.custom-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 15, 28, 0.9);
    backdrop-filter: blur(5px);
}

.loader-overlay {
    text-align: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: var(--shadow);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.info {
    border-left: 4px solid var(--primary);
}

/* ===== TRONLINK WARNING ===== */
.tronlink-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(255, 184, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    color: var(--warning);
    font-size: 14px;
}

.tronlink-warning a {
    color: var(--primary-light);
    text-decoration: none;
}

.tronlink-warning a:hover {
    text-decoration: underline;
}

/* ===== LOW GAS WARNING ===== */
.low-gas-warning {
    margin-bottom: 16px;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.claim-card {
    animation: slideIn 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .card-content {
        padding: 30px 20px;
    }
    
    .amount-number {
        font-size: 36px;
    }
    
    .step-line {
        width: 30px;
    }
    
    .trust-section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .social-proof {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .header-right .badge {
        display: none;
    }
    
    .amount-number {
        font-size: 28px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .step-line {
        width: 15px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header, .footer, .connect-btn, .approve-btn, .timer-section {
        display: none;
    }
    
    body, .claim-card {
        background: white;
        color: black;
    }
}

/* ===== WALLET SELECTOR MODAL ===== */
.wallet-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.wallet-selector-modal {
    background: var(--bg-card);
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.wallet-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.wallet-selector-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.wallet-selector-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s;
}

.wallet-selector-close:hover {
    color: var(--text-primary);
}

.wallet-selector-list {
    padding: 16px;
}

.wallet-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.wallet-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.wallet-icon {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    border-radius: 12px;
    object-fit: contain;
}

.wallet-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.qr-modal-content {
    background: #131a2c;
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid #1e293b;
    box-shadow: 0 0 40px rgba(51, 97, 255, 0.3);
}

.qr-modal-content h2 {
    color: #e0e7ff;
    font-size: 1.8rem;
    margin-bottom: 32px;
}

.qr-wrapper {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin: 0 auto 32px;
    width: 288px;
    height: 288px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#qrCodeContainer {
    width: 256px !important;
    height: 256px !important;
}

.qr-modal-content p {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

.close-qr {
    background: #3361ff;
    color: white;
    border: none;
    padding: 14px 48px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.close-qr:hover {
    background: #2952e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(51,97,255,0.4);
}

/* Модалки футера */
.info-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.info-modal .modal-content {
    background: #131a2c;
    padding: 40px 32px;
    border-radius: 16px;
    max-width: 520px;
    width: 90%;
    border: 1px solid #1e293b;
    box-shadow: 0 0 40px rgba(51, 97, 255, 0.3);
    color: #e0e7ff;
    position: relative;
}

.info-modal .close-modal {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 32px;
    color: #94a3b8;
    cursor: pointer;
}

.info-modal .close-modal:hover {
    color: white;
}

.info-modal h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: #e0e7ff;
}

.info-modal p, .info-modal ul {
    font-size: 1rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 16px;
}

.info-modal ul {
    padding-left: 24px;
}

.info-modal ul li {
    margin-bottom: 12px;
}

/* Футер (чтобы ссылки выглядели лучше) */
.footer-links a {
    color: #94a3b8;
    margin: 0 16px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3361ff;
}