@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Orbitron:wght@500;700;900&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-main: #020617;
    --bg-panel: rgba(15, 23, 42, 0.45);
    --bg-card: rgba(30, 41, 59, 0.6);
    --border-color: rgba(56, 189, 248, 0.2);
    --border-glow: rgba(56, 189, 248, 0.4);
    --accent-cyan: #00f0ff;
    --accent-gold: #fbbf24;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --glow-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
    --font-header: 'Orbitron', 'Outfit', sans-serif;
    --font-body: 'Outfit', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) rgba(15, 23, 42, 0.5);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 4px;
    box-shadow: 0 0 5px var(--accent-cyan);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    user-select: none;
}

/* Background grid animation */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    z-index: -2;
    pointer-events: none;
}

.bg-radial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.3) 0%, #020617 80%);
    z-index: -2;
    pointer-events: none;
}

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

.particle {
    position: absolute;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.15;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0.5) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-10vh) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

/* Launcher and general panels */
.launcher-container {
    width: 95%;
    max-width: 1300px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(0, 240, 255, 0.02);
    z-index: 10;
    position: relative;
    animation: fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header UI */
.game-title {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 3.5rem;
    text-align: center;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 40px rgba(0, 240, 255, 0.3);
    position: relative;
}

.game-title::after {
    content: 'Mega Tactical';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--accent-gold);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 35px 0 50px 0;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Main Cards selection grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.menu-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.menu-action-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.menu-action-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 15px 35px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.menu-action-card:hover::before {
    opacity: 1;
}

.card-ico {
    font-size: 3.5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
    transition: transform 0.3s ease;
}

.menu-action-card:hover .card-ico {
    transform: scale(1.15) rotate(5deg);
}

.card-name {
    font-family: var(--font-header);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Play Layout splits */
.play-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 968px) {
    .play-split {
        grid-template-columns: 1fr;
    }
}

.scroll-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Mode Item styling */
.mode-card-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.mode-card-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateX(5px);
}

.mode-card-item.active {
    background: rgba(14, 116, 144, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.mode-card-item.active::before {
    background: var(--accent-cyan);
}

.mode-card-title {
    font-family: var(--font-header);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Control widgets */
.dashboard-widget {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-title {
    font-family: var(--font-header);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

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

.control-row label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}

.control-input {
    background: #0b1329;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Grid of tanks for selection */
.tank-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 180px;
    overflow-y: auto;
    padding: 5px;
}

.tank-select-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.tank-select-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.2);
    background: rgba(30, 41, 59, 0.8);
}

.tank-select-card.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.tank-select-class {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.tank-select-name {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Giant action buttons */
.btn-giant {
    background: linear-gradient(135deg, #0284c7 0%, var(--accent-cyan) 100%);
    border: none;
    border-radius: 12px;
    color: #020617;
    font-family: var(--font-header);
    font-size: 1.4rem;
    font-weight: 900;
    padding: 16px 32px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.35);
    width: 100%;
    margin-top: 15px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-giant:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
}

.btn-giant:active {
    transform: scale(0.98);
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    text-decoration: none;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

/* Assembly Garage view style */
.assembly-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
}

@media (max-width: 968px) {
    .assembly-grid {
        grid-template-columns: 1fr;
    }
}

.blueprint-view {
    background: rgba(15, 23, 42, 0.6);
    border: 2px dashed rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 400px;
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.02);
}

.blueprint-mesh {
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.rotating-tank {
    font-size: 7.5rem;
    margin: 40px 0;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.35));
    animation: hover-float 4s ease-in-out infinite;
}

@keyframes hover-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

.blueprint-title {
    font-family: var(--font-header);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0,240,255,0.4);
    margin-bottom: 25px;
    z-index: 2;
}

/* Stats visualizer list */
.stat-panel-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    z-index: 2;
}

.stat-pill {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pill-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.pill-val {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(251,191,36,0.3);
}

.config-accordions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.accordion-group {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.accordion-header {
    font-family: var(--font-header);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 8px;
}

.config-sliders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Custom gorgeous slider styling */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-container label {
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
}

.slider-container input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #0b1329;
    outline: none;
    border: 1px solid rgba(255,255,255,0.05);
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Garage tanks saver list */
.saved-tanks-holder {
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.tanks-list-scroller {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    margin-top: 10px;
}

.saved-tank-row {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-tank-row span {
    font-weight: 700;
    color: var(--accent-green);
    font-size: 0.95rem;
}

.btn-small-load {
    background: var(--accent-gold);
    border: none;
    color: #000;
    font-family: var(--font-header);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small-load:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(251,191,36,0.5);
}

.btn-small-save {
    background: var(--accent-cyan);
    border: none;
    color: #000;
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small-save:hover {
    box-shadow: 0 0 10px rgba(0,240,255,0.5);
}
