/* ==========================================================================
   AETHVION LABS - CYBERNETIC AIM TRAINER STYLESHEET
   ========================================================================== */

/* Layout & Grid Setup */
.aim-trainer-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .aim-trainer-grid {
        grid-template-columns: 1fr;
    }
}

/* Control Panel Card Styles */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    height: fit-content;
}

.panel-title {
    font-size: 1.25rem;
    font-family: 'Orbitron', var(--font-family-fallback, sans-serif);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    padding-bottom: 12px;
}

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

.control-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.control-label-inline {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

/* Mode Tabs Selector */
.mode-tabs {
    display: flex;
    gap: 8px;
    background: rgba(5, 10, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px;
}

.mode-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.6);
}

.mode-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab.active {
    color: #00F0FF;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.25);
    box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.05);
}

.tab-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.tab-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-description {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
    margin-top: 2px;
}

/* Difficulty Selector Grid */
.diff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.diff-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diff-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.diff-btn.active {
    background: rgba(147, 51, 234, 0.15);
    border-color: rgba(147, 51, 234, 0.4);
    color: #c084fc;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.1);
}

/* Custom Settings Panel & Range Sliders */
.custom-settings {
    background: rgba(5, 10, 20, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
}

.slider-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.slider-header span:last-child {
    font-family: monospace;
    color: #00F0FF;
}

/* Range Inputs */
.slider-item input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: background 0.3s ease;
}

.slider-item input[type="range"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.slider-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00F0FF;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
    transition: transform 0.1s ease;
}

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

.slider-item input[type="range"]:disabled::-webkit-slider-thumb {
    background: #555;
    box-shadow: none;
    cursor: not-allowed;
}

/* Toggles & Switches */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 22px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.4);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: #00F0FF;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}

/* Trigger Button */
.btn-initialize {
    margin-top: 5px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #00F0FF;
    transition: all 0.3s ease;
}

.btn-initialize:hover {
    background: #00F0FF;
    color: #050a14;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.btn-initialize.active-run {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-initialize.active-run:hover {
    background: #ef4444;
    color: #050a14;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Play Stage Panel Styles */
.stage-panel {
    display: flex;
    flex-direction: column;
    padding: 16px;
    position: relative;
}

/* HUD Header overlays */
.live-hud {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(5, 10, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}

.hud-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

/* Interactive Canvas Playground */
.canvas-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 420px;
    background: #060913;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* Crosshair Cursor on Canvas active states */
#aim-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Pre-game Canvas Overlay Frame */
.arena-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 9, 19, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.overlay-content {
    max-width: 460px;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.4s ease;
}

.overlay-logo {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
    animation: pulseLogo 2s infinite ease-in-out;
}

.overlay-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    margin-bottom: 12px;
}

.overlay-instructions {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-start-action {
    padding: 12px 32px;
    background: linear-gradient(135deg, #00f0ff 0%, #9333ea 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
    transition: all 0.25s ease;
}

.btn-start-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.btn-start-action:active {
    transform: translateY(0);
}

/* Below-grid Dashboard Cards */
.telemetry-dashboard {
    padding: 24px;
    margin-bottom: 24px;
}

.dashboard-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-card {
    background: rgba(5, 10, 20, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.25s ease;
}

.metric-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.metric-header {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
}

.metric-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Post-Game Summary Modal Box Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 5, 10, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    position: relative;
    max-width: 680px;
    width: 90%;
    padding: 32px;
    animation: modalSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-glow-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #00f0ff, #9333ea);
    border-radius: 8px 8px 0 0;
}

.modal-title {
    font-size: 1.35rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .modal-body-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-stat-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.summary-stat-row span:first-child {
    color: rgba(255, 255, 255, 0.60);
    font-weight: 500;
}

.summary-stat-row span:last-child {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.summary-chart-container {
    background: rgba(5, 10, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 180px;
}

.chart-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    align-self: flex-start;
}

.summary-chart-container canvas {
    width: 100% !important;
    height: calc(100% - 20px) !important;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 24px;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 6px;
    color: #c084fc;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.modal-btn:hover {
    background: #9333ea;
    color: #fff;
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseLogo {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.6)); }
    100% { transform: scale(1); opacity: 0.9; }
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
