/* static/css/base.css */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-1: #ff006e;
    --accent-2: #8338ec;
    --accent-3: #06ffa5;
    --accent-4: #00d4ff;
    --shadow: rgba(0, 0, 0, 0.3);
    --card-bg: rgba(26, 26, 26, 0.9);
    --canvas-bg: #0a0a0a;
    --header-bg: rgba(26, 26, 26, 0.9);
}

body.light-mode {
    --bg-primary: linear-gradient(135deg, #faf8f3 0%, #f5f2ed 50%, #faf7f0 100%);
    --bg-secondary: #f0ebe3;
    --text-primary: #3a3a3a;
    --text-secondary: #6a6a6a;
    --accent-1: #e85d75;
    --accent-2: #9b6dd6;
    --accent-3: #52c9a8;
    --accent-4: #5dade2;
    --shadow: rgba(0, 0, 0, 0.08);
    --card-bg: rgba(255, 252, 247, 0.85);
    --canvas-bg: linear-gradient(135deg, #fdfbf7 0%, #f8f5f0 100%);
    --header-bg: rgba(255, 252, 247, 0.85);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    width: 100vw;
}

.app-container {
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    transition: background 0.5s ease;
    overflow: hidden;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px var(--shadow);
    transition: all 0.5s ease;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 30px;
}

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

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    font-weight: 300;
    font-family: 'Playfair Display', 'Georgia', serif;
    font-style: italic;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    user-select: none;
}

.controls {
    margin-left: auto;
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-3);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

body.light-mode .theme-toggle {
    box-shadow: 0 2px 12px rgba(82, 201, 168, 0.15);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(6, 255, 165, 0.3);
}

body.light-mode .theme-toggle:hover {
    box-shadow: 0 4px 20px rgba(82, 201, 168, 0.25);
}

.nav-categories {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 15px;
}

.nav-category {
    position: relative;
}

.category-toggle {
    padding: 12px 30px;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
}

.category-toggle:hover {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: white;
    transform: translateY(-2px);
}

body.light-mode .category-toggle:hover {
    background: linear-gradient(135deg, #e85d75 0%, #9b6dd6 100%);
    box-shadow: 0 4px 16px rgba(232, 93, 117, 0.2);
}

.category-toggle.active {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: white;
}

body.light-mode .category-toggle.active {
    background: linear-gradient(135deg, #e85d75 0%, #9b6dd6 100%);
    box-shadow: 0 4px 16px rgba(232, 93, 117, 0.2);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    min-width: 250px;
    z-index: 1001;
}

body.light-mode .nav-dropdown {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.nav-category:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    text-align: center;
    margin-bottom: 8px;
}

.nav-btn:last-child {
    margin-bottom: 0;
}

.nav-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-2);
}

body.light-mode .nav-btn:hover {
    background: rgba(155, 109, 214, 0.08);
    border-color: var(--accent-2);
}

.nav-btn.active {
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.4);
}

body.light-mode .nav-btn.active {
    background: linear-gradient(45deg, #e85d75, #9b6dd6);
    box-shadow: 0 4px 15px rgba(232, 93, 117, 0.2);
}

.content-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    transition: background 0.5s ease;
}

.content-section {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
    background: var(--canvas-bg);
}

.content-section.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--canvas-bg);
    transition: background 0.5s ease;
}

.three-container {
    width: 100%;
    height: 100%;
    background: var(--canvas-bg);
    transition: background 0.5s ease;
}

.info-panel {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    text-align: left;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    max-width: 350px;
    z-index: 999;
    opacity: 0;
    animation: slideInRight 0.6s ease 0.3s forwards;
    line-height: 1.5;
}

body.light-mode .info-panel {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(82, 201, 168, 0.15);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.combo-display {
    position: fixed;
    bottom: 40px;
    right: 40px;
    padding: 0;
    font-size: 56px;
    font-weight: 900;
    font-family: 'Impact', 'Arial Black', sans-serif;
    color: transparent;
    z-index: 999;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 1s ease-out;
    text-transform: uppercase;
    letter-spacing: 2px;
    pointer-events: none;
}

.combo-display.active {
    animation: comboStamp 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.combo-display.fadeout {
    animation: comboFadeOut 1s ease-out forwards;
}

@keyframes comboStamp {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes comboFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

.combo-display .combo-number {
    font-size: 112px;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 0, 110, 0.6));
}

body.light-mode .combo-display .combo-number {
    filter: drop-shadow(0 0 6px rgba(232, 93, 117, 0.3));
}

@media (max-width: 1200px) {
    .nav-categories {
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .header-content {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 26px;
    }
    
    .nav-categories {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 12px;
        position: relative;
    }
    
    .logo {
        position: relative;
        left: 0;
        transform: none;
        font-size: 24px;
    }
    
    .controls {
        margin-left: 0;
    }
    
    .nav-categories {
        flex-direction: row;
        gap: 15px;
    }
    
    .category-toggle {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .nav-dropdown {
        min-width: 200px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .info-panel {
        font-size: 13px;
        padding: 14px 25px;
        bottom: 25px;
    }
    
    .combo-display {
        bottom: 25px;
        right: 25px;
        font-size: 28px;
    }
    
    .combo-display .combo-number {
        font-size: 56px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }
    
    .theme-toggle {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .category-toggle {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .nav-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    .info-panel {
        font-size: 12px;
        padding: 12px 20px;
        bottom: 20px;
    }
    
    .combo-display {
        bottom: 20px;
        right: 20px;
        font-size: 22px;
    }
    
    .combo-display .combo-number {
        font-size: 42px;
    }
}