/* main.css - Dark Mode Styles for index.html (Homepage/Login) */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: #e2e8f0;
}

/* Header */
.header {
    text-align: center;
    margin: 40px 0;
    color: white;
}

.header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 18px;
    color: #94a3b8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Messages */
.loading,
.success-message,
.error-message {
    background: #1e293b;
    padding: 15px 30px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s;
    border: 1px solid #334155;
}

.loading {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border-color: #3b82f6;
}

.success-message {
    background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
    color: white;
    border-color: #22c55e;
}

.error-message {
    background: linear-gradient(135deg, #991b1b 0%, #ef4444 100%);
    color: white;
    border-color: #ef4444;
}

.hidden {
    display: none;
}

/* Login Section */
.login-section {
    background: #1e293b;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 20px 0;
    border: 1px solid #334155;
}

.login-section h2 {
    margin-bottom: 15px;
    color: #f1f5f9;
    font-size: 28px;
}

.login-section p {
    color: #94a3b8;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* User Info Section */
.user-info {
    background: #1e293b;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
    margin: 20px 0;
    border: 1px solid #334155;
}

.user-info h3 {
    margin-bottom: 25px;
    color: #f1f5f9;
    font-size: 28px;
}

#userDetails {
    margin-bottom: 30px;
}

/* Wallet Info */
.wallet-info {
    background: #0f172a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #1e293b;
}

.wallet-info p {
    margin: 10px 0;
    color: #cbd5e1;
    font-size: 14px;
}

.wallet-info strong {
    color: #f1f5f9;
    margin-right: 8px;
}

.wallet-info select {
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #1e293b;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-info select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wallet-info select option {
    background: #1e293b;
    color: #e2e8f0;
}

/* Stats Section */
.stats-section {
    margin-top: 20px;
}

.stats-section h4 {
    margin-bottom: 15px;
    color: #f1f5f9;
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn.primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn.success:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

.btn.secondary {
    background: #475569;
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.4);
}

.btn.secondary:hover {
    background: #334155;
}

.btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.button-group .btn {
    flex: 1;
    min-width: 150px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 36px;
    }

    .header p {
        font-size: 16px;
    }

    .login-section,
    .user-info {
        padding: 30px 20px;
    }

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

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header {
        margin: 20px 0;
    }

    .header h1 {
        font-size: 28px;
    }

    .user-info h3 {
        font-size: 22px;
    }

    .stat-value {
        font-size: 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-section,
.user-info {
    animation: fadeIn 0.5s ease;
}

/* Glow effect for interactive elements */
.btn.primary,
.btn.success {
    position: relative;
    overflow: hidden;
}

.btn.primary::before,
.btn.success::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn.primary:hover::before,
.btn.success:hover::before {
    width: 300px;
    height: 300px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation styles */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #1a1a24;
    border-bottom: 1px solid #2a2a3a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    flex: 0 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a9eff;
    text-decoration: none;
}

.nav-logo:hover {
    color: #3a8eef;
}

.nav-center {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 1rem;
}

.nav-link:hover {
    color: #4a9eff;
}

#authNavLinks {
    display: flex;
    gap: 2rem;
}

.nav-right {
    flex: 0 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-greeting {
    color: #888;
    font-size: 0.9rem;
}

.btn-login,
.btn-logout {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-login {
    background: #4a9eff;
    color: white;
}

.btn-login:hover {
    background: #3a8eef;
}

.btn-logout {
    background: #2a2a3a;
    color: #e0e0e0;
}

.btn-logout:hover {
    background: #3a3a4a;
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-center {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #authNavLinks {
        flex-direction: column;
        gap: 0.5rem;
    }
}

