/* ===== TronMine - TRON Mining Platform Styles ===== */

/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --bg-dark: #0a0a1a;
    --bg-card: rgba(15, 15, 35, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;
}
input,textarea,select{-webkit-user-select:text;-moz-user-select:text;user-select:text}
img{-webkit-user-drag:none;pointer-events:none}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* ===== Animated Background ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
                var(--bg-dark);
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stars {
    background: radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
                radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
                radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
                radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent),
                radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.3), transparent);
    background-size: 200px 100px;
    animation: starsMove 80s linear infinite;
}

.stars2 {
    background: radial-gradient(1px 1px at 50px 20px, rgba(255,255,255,0.2), transparent),
                radial-gradient(2px 2px at 100px 50px, rgba(255,255,255,0.15), transparent),
                radial-gradient(1px 1px at 70px 80px, rgba(255,255,255,0.25), transparent);
    background-size: 150px 120px;
    animation: starsMove 120s linear infinite;
}

.stars3 {
    background: radial-gradient(1px 1px at 30px 60px, rgba(59,130,246,0.3), transparent),
                radial-gradient(1px 1px at 80px 30px, rgba(139,92,246,0.2), transparent),
                radial-gradient(2px 2px at 120px 70px, rgba(6,182,212,0.2), transparent);
    background-size: 180px 150px;
    animation: starsMove 160s linear infinite;
}

@keyframes starsMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100vh); }
}

/* ===== Navigation ===== */
.nav-glass {
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-glass.scrolled {
    background: rgba(10, 10, 26, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--glow-blue);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-blue);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover::before {
    left: -100%;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706, #b45309);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Hero Section ===== */
.hero-gradient {
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element-delay {
    animation: float 6s ease-in-out 3s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

/* Counter animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ===== Live Ticker ===== */
.ticker-wrap {
    overflow: hidden;
    width: 100%;
}

.ticker {
    display: flex;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ticker-item .amount {
    color: var(--success);
    font-weight: 600;
    margin-left: 0.5rem;
}

.ticker-item .address {
    color: var(--primary);
    font-family: monospace;
    margin-right: 0.5rem;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Pool Cards ===== */
.pool-card {
    transition: all 0.4s ease;
    position: relative;
}

.pool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--glow-blue);
}

.pool-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popular-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vip-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.modal-overlay.hidden {
    display: none;
    animation: none;
}

.modal-content {
    animation: slideUp 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Dashboard Cards ===== */
.dashboard-card {
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow-blue);
}

/* ===== Steps ===== */
.step-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.step-icon {
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.step-icon:hover {
    transform: translateY(-4px) scale(1.05);
}

/* ===== Referral Cards ===== */
.referral-card {
    transition: all 0.3s ease;
}

.referral-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===== FAQ ===== */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.faq-btn {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* ===== Toast ===== */
#toast {
    animation: toastIn 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Mining Record Items ===== */
.record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}

.record-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

/* ===== Active Stakes Table ===== */
#activeStakes tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}

#activeStakes tr:hover {
    background: rgba(255,255,255,0.03);
}

#activeStakes td {
    padding: 12px 16px;
    font-size: 0.9rem;
}

.status-active {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-completed {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-expired {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
}

.claim-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.claim-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Mining Animation ===== */
.mining-pulse {
    animation: miningPulse 2s ease-in-out infinite;
}

@keyframes miningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Glow Effects ===== */
.glow-blue {
    box-shadow: var(--glow-blue);
}

.glow-purple {
    box-shadow: var(--glow-purple);
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Progress Ring ===== */
.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}

.progress-ring .bg {
    stroke: rgba(255,255,255,0.1);
}

.progress-ring .progress {
    stroke: var(--primary);
    stroke-dasharray: 226;
    transition: stroke-dashoffset 0.5s ease;
}

/* ===== Particle Effect ===== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% { 
        transform: translateY(-50px) translateX(20px);
        opacity: 0.8;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .text-5xl { font-size: 2.5rem; }
    .text-7xl { font-size: 3rem; }
    
    .pool-card {
        margin-bottom: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    #activeStakes {
        font-size: 0.8rem;
    }

    .ticker-item {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .text-5xl { font-size: 2rem; }
    
    .glass-card.p-6 {
        padding: 1rem;
    }

    .btn-primary, .btn-outline {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ===== Whitepaper Styles ===== */
.wp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.wp-container h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.wp-container h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.wp-container h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #60a5fa;
}

.wp-container p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.wp-container ul, .wp-container ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.wp-container li {
    margin-bottom: 0.5rem;
}

.wp-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.wp-container table th,
.wp-container table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--glass-border);
}

.wp-container table th {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    font-weight: 600;
}

.wp-container table td {
    color: var(--text-secondary);
}

.wp-container code {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: #60a5fa;
}

.wp-container pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.wp-container pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

.wp-container blockquote {
    border-left: 3px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 12px 12px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* TOC */
.wp-toc {
    position: sticky;
    top: 80px;
}

.wp-toc a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 16px;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.wp-toc a:hover, .wp-toc a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

/* Language Dropdown */
.lang-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.lang-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}
.lang-toggle-btn i { font-size: 0.85rem; }
.lang-toggle-btn .lang-label { line-height: 1; }

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: rgba(15, 15, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px 0;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 999;
}
.lang-dropdown.show { display: block; }

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lang-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
}
.lang-dropdown-item.active {
    color: var(--primary);
    font-weight: 600;
}
.lang-dropdown-item.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 0.7rem;
}
