/* ==================== GLOBAL RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme (default) */
    --bg-primary: #e8e8e8;
    --bg-secondary: #ffffff;
    --bg-nav: #5a5a5a;
    --text-primary: #2a2a2a;
    --text-secondary: #666666;
    --text-nav: #ffffff;
    --accent: #4a7ba7;
    --accent-hover: #3a6a97;
    --success: #4caf50;
    --warning: #ff9800;
    --border: #d0d0d0;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1d29;
    --bg-secondary: #242837;
    --bg-nav: #2d3348;
    --text-primary: #e8e9f3;
    --text-secondary: #9094a6;
    --text-nav: #e8e9f3;
    --border: #3a3f5c;
    --shadow: rgba(0, 0, 0, 0.4);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== NAVIGATION ==================== */
.main-nav {
    background: var(--bg-nav);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-nav);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: var(--text-nav);
    text-decoration: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.nav-link:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
}

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


/* ==================== HAMBURGER MENU ==================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-nav);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

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

.hero-section {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.primary-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

/* ==================== CONTENT BOXES ==================== */
.content-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px var(--shadow);
}

.content-box h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
}

/* ==================== CALCULATOR GRID ==================== */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.calc-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.calc-card:hover:not(.coming-soon) {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--shadow);
}

.calc-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}



.calc-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.calc-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.calc-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #999;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background: var(--success);
}

/* ==================== FEATURES ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}



.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== CALCULATOR PAGE ==================== */
.banner-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.banner-tab {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.banner-tab:hover {
    border-color: var(--accent);
}

.banner-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.calc-section {
    margin-bottom: 30px;
}

.calc-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.input-row {
    margin-bottom: 20px;
}

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

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

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-group input[type="number"] {
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group small {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
}

.checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

/* ==================== RESULTS ==================== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 6px;
    border: 2px solid var(--border);
}

.result-card.highlighted {
    background: linear-gradient(135deg, rgba(74, 123, 167, 0.08) 0%, rgba(74, 123, 167, 0.03) 100%);
    border: 2px solid var(--accent);
}

.result-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 600;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.result-card small {
    display: block;
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.summary-table {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.summary-row:last-child {
    border-bottom: none;
    padding-top: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.verdict {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 2px solid var(--success);
    padding: 18px;
    border-radius: 6px;
    text-align: center;
}

.verdict p {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--success);
    margin: 0;
}

.verdict.insufficient {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 152, 0, 0.05) 100%);
    border-color: var(--warning);
}

.verdict.insufficient p {
    color: var(--warning);
}

/* ==================== FOOTER ==================== */
.main-footer {
    background: var(--bg-nav);
    color: var(--text-nav);
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background: var(--bg-nav);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        z-index: 100;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px 20px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .calculator-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-selector {
        flex-direction: column;
    }
    
    .banner-tab {
        min-width: 100%;
    }
}

/* ==================== FAQ SECTION ==================== */
.faq-section {
    margin-top: 30px;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}


/* ==================== FORTNITE SHOP STYLES ==================== */

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.retry-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.retry-btn:hover {
    opacity: 0.9;
}

/* Shop Stats */
.shop-stats {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.shop-stats p {
    margin: 5px 0;
}

.shop-stats strong {
    color: var(--accent);
    font-size: 1.3rem;
}

.shop-refresh {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Shop Filter */
.shop-filter {
    margin: 20px 0;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.shop-filter label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.shop-filter select {
    padding: 10px 15px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.shop-filter select:focus {
    outline: none;
    border-color: var(--accent);
}

.shop-filter select:hover {
    border-color: var(--accent);
}

/* Fortnite Shop Grid */
.fortnite-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Item Card */
.fortnite-item-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.fortnite-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

/* Item Image Container */
.item-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: 3px solid;
    overflow: hidden;
}

.item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Item Banner */
.item-banner {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Item Info */
.item-info {
    padding: 15px;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
    line-height: 1.3;
}

.item-rarity {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.item-bundle-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Price */
.item-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.price-final {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.vbuck-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    display: inline-block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fortnite-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .item-name {
        font-size: 0.95rem;
    }

    .item-info {
        padding: 12px;
    }
    
    .discount-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .item-banner {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .shop-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shop-filter select {
        width: 100%;
        min-width: 100%;
    }
}
/* Bundle Toggle Button */
.bundle-toggle-btn {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--accent);
    color: white;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.bundle-toggle-btn:hover {
    opacity: 0.9;
}

/* Bundle Contents */
.bundle-contents {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.bundle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

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

.bundle-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-secondary);
}

.bundle-item span {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.bundle-item small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}


/* ========================================
   GENSHIN INFO SECTIONS
   ======================================== */

.info-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #5f9ea0;
}

.info-section h2 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.6em;
}

.info-section h3 {
    color: #34495e;
    margin-top: 20px;
    font-size: 1.3em;
}

.info-section ul {
    margin: 15px 0;
    padding-left: 25px;
}

.info-section li {
    margin: 10px 0;
    line-height: 1.6;
}

.info-section p {
    line-height: 1.7;
    color: #555;
}

/* Primogem Income Table */
.primogem-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.primogem-table th,
.primogem-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.primogem-table th {
    background: #5f9ea0;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.primogem-table tbody tr:hover {
    background: #f5f5f5;
    transition: background 0.2s ease;
}

.primogem-table .total-row {
    background: #e8f4f5;
    font-weight: bold;
    border-top: 2px solid #5f9ea0;
}

.primogem-table .total-row td {
    color: #2c3e50;
    font-size: 1.05em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .info-section {
        padding: 15px;
        margin: 20px 0;
    }
    
    .info-section h2 {
        font-size: 1.3em;
    }
    
    .info-section h3 {
        font-size: 1.1em;
    }
    
    .primogem-table {
        font-size: 14px;
    }
    
    .primogem-table th,
    .primogem-table td {
        padding: 8px 10px;
    }
    
    .primogem-table th {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .primogem-table {
        font-size: 12px;
    }
    
    .primogem-table th,
    .primogem-table td {
        padding: 6px 8px;
    }
}
