* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#userGreeting {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--card-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-muted);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
}

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

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.wallet-card,
.mining-card,
.history-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.wallet-card h2,
.mining-card h2,
.history-card h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.token-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.token-symbol {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Mining Interface */
.mining-content {
    text-align: center;
}

.mining-status {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.countdown {
    margin: 2rem 0;
}

.countdown p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-unit span:first-child {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    min-width: 80px;
}

.time-unit .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.mine-btn {
    margin: 2rem 0 1rem;
    font-size: 1.3rem;
    padding: 1.5rem 3rem;
}

.mining-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mining History */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-tokens {
    color: var(--success-color);
    font-weight: 600;
}

.history-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-history {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* How It Works */
.how-it-works {
    padding: 4rem 0;
    background: rgba(30, 41, 59, 0.5);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-muted);
}

/* Contact */
.contact {
    padding: 4rem 0;
    text-align: center;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-email {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

.contact-email:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-primary);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(150%);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
}

.toast.success {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.toast.error {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .balance-amount {
        font-size: 2rem;
    }

    .time-unit span:first-child {
        font-size: 1.8rem;
        padding: 0.75rem 1rem;
        min-width: 60px;
    }

    .timer {
        gap: 1rem;
    }

    .mine-btn {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
    }

    .toast {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-features {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.mining-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Scrollbar */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
