/* CSS Custom Properties (Theme Variables) */
:root {
    /* Primary Color Palette */
    --primary-color: #ff6b35;        /* Main orange-red */
    --primary-dark: #e85d2c;         /* Darker shade for hover states */
    --secondary-color: #ffa500;      /* Orange for accents */
    --warning-color: #ff4500;        /* Red-orange for warnings */
    --danger-color: #dc143c;         /* Red for errors */
    
    /* Background Colors */
    --bg-primary: #0a0a0a;           /* Darkest background */
    --bg-secondary: #1a0f0a;         /* Slightly lighter background */
    --bg-card: #1f1410;              /* Card backgrounds */
    
    /* Border & Text Colors */
    --border-color: #4a2c20;         /* Brown borders */
    --text-primary: #ffd4b3;         /* Light cream text */
    --text-secondary: #ffb380;       /* Medium cream text */
    --text-muted: #cc8866;           /* Muted brown text */
    
    /* Background Overlays */
    --success-bg: rgba(255, 165, 0, 0.1);   /* Orange success background */
    --warning-bg: rgba(255, 69, 0, 0.1);    /* Red warning background */
    --danger-bg: rgba(220, 20, 60, 0.1);    /* Red danger background */
    
    /* Gradient Definitions */
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff4500 50%, #ff8c00 100%);
    --gradient-secondary: linear-gradient(135deg, #ffa500 0%, #ff6347 100%);
    --gradient-fire: linear-gradient(180deg, #ff0000, #ff4500, #ff6b35, #ff8c00, #ffa500);
    
    /* Special Effects */
    --glow-color: #ff4500;           /* Glow effects */
    --ember-color: #ff6347;          /* Ember particle effects */
}

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

body {
    font-family: 'Stick No Bills', 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Navbar Container */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px var(--glow-color);
}

/* Navigation Content Layout */
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    filter: drop-shadow(0 0 8px var(--glow-color));
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px var(--glow-color));
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--success-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--warning-bg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    color: var(--primary-color);
    box-shadow: 0 4px 15px var(--glow-color);
}

/* Right Side Navigation */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Network Info */
.network-info {
    padding: 0.5rem 1rem;
    background: var(--success-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Social Link */
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--success-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--warning-bg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--glow-color);
}

/* Connect Wallet Button */
.btn-connect {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--glow-color);
}

/* Wallet Info (for connected state) */
.wallet-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(45deg, #ff8c00, #ff6b00);
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
}

.disconnect-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.disconnect-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 15px 0;
    border-bottom: 2px solid var(--border-color);
}

.info-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-weight: 500;
}

.info-content i {
    font-size: 18px;
}

/* Brand Text */
.brand-text {
    font-family: 'Stick No Bills', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary-color);
}

/* Global Font Optimizations */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Stick No Bills', sans-serif;
    font-weight: 700;
}

.hero-title, .section-title {
    font-family: 'Stick No Bills', sans-serif;
    font-weight: 700;
}

button, .btn, .action-btn {
    font-family: 'Stick No Bills', sans-serif;
    font-weight: 600;
}


/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-fire);
    opacity: 0.05;
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px var(--glow-color));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-fire);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px var(--glow-color);
}

.card:hover::before {
    opacity: 0.05;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

/* User Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Action Tabs */
.action-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Input Groups */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-with-max {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.input-with-max input {
    flex: 1;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.input-with-max input::placeholder {
    color: var(--text-muted);
}

.max-btn {
    padding: 16px 20px;
    background: var(--success-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.max-btn:hover {
    background: var(--warning-bg);
}

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

/* Action Buttons */
.action-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:disabled,
.action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    transform: none !important;
    box-shadow: none !important;
}

.action-btn:disabled:hover,
.action-btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--glow-color);
}

.action-btn.danger {
    background: linear-gradient(45deg, var(--danger-color), #ff6b6b);
    color: white;
}

.action-btn.danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--danger-color);
}

.action-btn.success {
    background: var(--gradient-secondary);
    color: white;
}

.action-btn.success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--secondary-color);
}

.action-btn.secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.action-btn.secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--border-color);
    background: var(--success-bg);
}

/* Loading animation for global data */
@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Balance Lookup Section */
.balance-lookup-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0.05) 100%);
}

.balance-lookup-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.lookup-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group label {
    color: #ff6b35;
    font-weight: 600;
    font-size: 1.1rem;
}

.input-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.balance-result {
    animation: slideIn 0.5s ease;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.result-card h3 {
    color: #ff6b35;
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.result-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.result-value {
    color: #ff6b35;
    font-weight: 600;
    font-size: 1.1rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .balance-lookup-container {
        padding: 0 0.5rem;
    }
    
    .lookup-form {
        padding: 1.5rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .result-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Warning Box */
.warning-box {
    background: var(--warning-bg);
    border: 1px solid var(--warning-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--warning-color);
    font-size: 0.9rem;
}

/* Rewards */
.rewards-info {
    margin-bottom: 24px;
}

.reward-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-stat:last-child {
    border-bottom: none;
}

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

.reward-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Rounds Section */
.rounds-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rounds-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.rounds-list {
    max-height: 400px;
    overflow-y: auto;
}

.round-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.round-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.round-id {
    color: var(--primary-color);
    font-weight: 600;
}

.round-amount {
    color: var(--text-primary);
}

.round-score {
    color: var(--text-muted);
}

.round-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.round-status.active {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.round-status.canceled {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

/* Stats Section */
.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-content h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: rgba(15, 15, 35, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 0;
    margin-top: 80px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    filter: drop-shadow(0 0 6px var(--glow-color));
    transition: all 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px var(--glow-color));
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    color: white;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success {
    border-left: 4px solid #34c759;
}

.toast.error {
    border-left: 4px solid #ff3b30;
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }

    .nav-buttons {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .network-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .wallet-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .rounds-header,
    .round-item {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }

    .rounds-header {
        display: none;
    }

    .round-item {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.05);
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .card {
        padding: 20px;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}
