/* ============================================
   NX CS2 CoNFiG V2.0 - Source 2 Engine
   Modern CS2 Themed Config Generator
   ============================================ */

:root {
    --cs2-orange: #ff6b00;
    --cs2-orange-light: #ff8c42;
    --cs2-orange-dark: #cc5500;
    --cs2-black: #0a0a0a;
    --cs2-dark: #111111;
    --cs2-gray: #1a1a1a;
    --cs2-gray-light: #2a2a2a;
    --cs2-white: #ffffff;
    --cs2-text: #e0e0e0;
    --cs2-text-muted: #888888;
    --cs2-accent: #ff6b00;
    --cs2-green: #00ff88;
    --cs2-red: #ff4444;
    --cs2-blue: #4488ff;
    --glass-bg: rgba(20, 20, 20, 0.85);
    --glass-border: rgba(255, 107, 0, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--cs2-black);
    color: var(--cs2-text);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 107, 0, 0.03) 0%, transparent 50%);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--cs2-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--cs2-orange);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cs2-orange-light);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--cs2-orange), var(--cs2-orange-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 107, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 0, 0.6); }
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cs2-white), var(--cs2-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 11px;
    color: var(--cs2-text-muted);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 6px;
    background: var(--cs2-gray);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--cs2-gray-light);
}

.lang-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--cs2-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--cs2-white);
    background: rgba(255, 107, 0, 0.1);
}

.lang-btn.active {
    background: var(--cs2-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

/* Navigation */
.nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 20px 15px;
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: var(--cs2-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 107, 0, 0.1);
    color: var(--cs2-white);
    border-color: rgba(255, 107, 0, 0.2);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.2), rgba(255, 107, 0, 0.05));
    color: var(--cs2-orange);
    border-color: var(--cs2-orange);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.1);
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cs2-orange);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* Main Content */
.main {
    margin-left: 260px;
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
}

/* Section Cards */
.section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section.active {
    display: block;
}

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

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--cs2-white), var(--cs2-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--cs2-text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 107, 0, 0.4);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cs2-gray-light);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--cs2-orange), var(--cs2-orange-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cs2-white);
}

/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

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

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cs2-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select {
    background: var(--cs2-gray);
    border: 1px solid var(--cs2-gray-light);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--cs2-white);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--cs2-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    padding: 0;
    background: var(--cs2-gray-light);
    border-radius: 3px;
    cursor: pointer;
}

.form-input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--cs2-orange);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
    transition: all 0.2s ease;
}

.form-input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.7);
}

.range-value {
    font-size: 13px;
    color: var(--cs2-orange);
    font-weight: 700;
    text-align: right;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--cs2-text);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--cs2-gray-light);
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.toggle-switch.active {
    background: var(--cs2-orange);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    left: 27px;
}

/* Crosshair Preview */
.preview-container {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.preview-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.preview-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cs2-orange);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

#crosshairCanvas {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    background: radial-gradient(circle at center, #2a2a3e 0%, #1a1a2e 100%);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: 2px solid var(--cs2-gray-light);
    border-radius: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cs2-orange), var(--cs2-orange-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 0, 0.5);
}

.btn-secondary {
    background: var(--cs2-gray);
    color: var(--cs2-text);
    border: 1px solid var(--cs2-gray-light);
}

.btn-secondary:hover {
    background: var(--cs2-gray-light);
    border-color: var(--cs2-orange);
}

.btn-success {
    background: linear-gradient(135deg, var(--cs2-green), #00cc6a);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Output Area */
.output-area {
    background: var(--cs2-dark);
    border: 1px solid var(--cs2-gray-light);
    border-radius: 12px;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--cs2-text);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
    position: relative;
}

.output-area .comment {
    color: #6a9955;
}

.output-area .command {
    color: #569cd6;
}

.output-area .value {
    color: #ce9178;
}

/* Keybind Grid */
.keybind-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.keybind-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cs2-gray);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--cs2-gray-light);
    transition: all 0.3s ease;
}

.keybind-item:hover {
    border-color: var(--cs2-orange);
    background: rgba(255, 107, 0, 0.05);
}

.keybind-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--cs2-text);
}

.keybind-input {
    width: 100px;
    background: var(--cs2-dark);
    border: 1px solid var(--cs2-gray-light);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--cs2-orange);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.keybind-input:focus {
    border-color: var(--cs2-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

/* Launch Options */
.launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.launch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--cs2-gray);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.launch-item:hover {
    border-color: var(--cs2-orange);
}

.launch-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--cs2-orange);
    cursor: pointer;
}

.launch-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cs2-text);
    cursor: pointer;
}

/* Footer */
.footer {
    margin-left: 260px;
    padding: 30px;
    text-align: center;
    color: var(--cs2-text-muted);
    font-size: 13px;
    border-top: 1px solid var(--cs2-gray-light);
}

.footer-brand {
    font-weight: 800;
    color: var(--cs2-orange);
    margin-bottom: 8px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav {
        transform: translateX(-100%);
        width: 280px;
    }
    .nav.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .footer {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }
    .logo-text {
        font-size: 18px;
    }
    .main {
        padding: 20px 15px;
    }
    .section-title {
        font-size: 22px;
    }
    .card {
        padding: 18px;
    }
    .btn-group {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .keybind-grid {
        grid-template-columns: 1fr;
    }
    .launch-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--cs2-gray);
    border: 1px solid var(--cs2-orange);
    color: var(--cs2-white);
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
}

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 107, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--cs2-orange);
    animation: spin 1s ease-in-out infinite;
}

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

/* Particle Background Effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--cs2-orange);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}
