/* Garage Grid Layout */
.garage-panel {
    width: 95vw;
    height: 90vh;
    max-width: 1200px;
    background: rgba(10, 15, 20, 0.6);
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.g-header {
    text-align: center;
    padding-bottom: 0px;
}

.g-header h2 {
    margin: 5px 0 15px 0;
}

/* Slot Styling */
.garage-slot {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s;
    position: relative;
    backdrop-filter: blur(5px);
}

.garage-slot label {
    display: block;
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-align: center;
}

/* Highlight Color overrides applied inline / via script, but default slot hover uses accent */
.garage-slot:hover {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Tabs */
.g-tab {
    background: none;
    border: none;
    color: #888;
    padding: 8px 5px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    flex: 1;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

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

.g-tab.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

/* Stats Panel */
.stats-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 0.8rem;
    color: #ccc;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    text-align: center;
}

.stat-item span:first-child {
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 2px;
}

.stat-val {
    color: #fff;
    font-weight: bold;
}

.stat-val.bonus {
    color: #4ade80;
    text-shadow: 0 0 5px #4ade80;
}

.stat-val.penalty {
    color: #ef4444;
    text-shadow: 0 0 5px #ef4444;
}

/* Synergy Notification */
.synergy-active {
    border-color: #ffd700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4) !important;
}

.synergy-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffd700;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: none;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* Quick Selection */
.selector-carousel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sel-btn {
    background: none;
    border: 1px solid #555;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 1.2rem;
}

.sel-btn:hover {
    background: #333;
    border-color: #ffd700;
    color: #ffd700;
}

.sel-current {
    text-align: center;
    flex: 1;
}

.sel-name {
    font-weight: bold;
    display: block;
    font-size: 1.1rem;
    color: #ffd700;
}

.sel-desc {
    font-size: 0.8rem;
    color: #aaa;
    display: block;
    margin: 5px auto 0;
    max-width: 200px;
    line-height: 1.3;
}

/* Footer Actions */
.garage-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.garage-actions button {
    padding: 10px 40px;
    font-family: var(--font-heading);
    cursor: pointer;
    font-size: 1.1rem;
    letter-spacing: 2px;
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
    transition: all 0.3s;
    text-transform: uppercase;
}

.garage-actions button:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-color);
}

.garage-actions .btn-red {
    background: rgba(255, 0, 0, 0.2);
    border-color: #f00;
    color: #f00;
    text-shadow: 0 0 5px #f00;
}

.garage-actions .btn-red:hover {
    background: #f00;
    color: #fff;
    box-shadow: 0 0 20px #f00;
}

/* Scrollbars */
.garage-col1 ::-webkit-scrollbar,
.garage-col3 ::-webkit-scrollbar {
    width: 4px;
}

.garage-col1 ::-webkit-scrollbar-track,
.garage-col3 ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.garage-col1 ::-webkit-scrollbar-thumb,
.garage-col3 ::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* Mobile Landscape Optimization */
@media (max-width: 950px) and (orientation: landscape) {
    .garage-panel {
        width: 100vw;
        height: 100vh;
        max-width: none;
        border: none;
        border-radius: 0;
        padding: 5px;
    }

    .garage-content {
        gap: 5px !important;
    }

    .garage-slot {
        padding: 5px;
    }

    .garage-slot label {
        font-size: 0.6rem;
        margin-bottom: 2px;
        letter-spacing: 0;
    }

    .sel-btn {
        width: 25px;
        height: 25px;
    }

    .sel-name {
        font-size: 0.8rem;
    }

    .sel-desc {
        display: none;
    }

    .stats-list {
        gap: 4px;
    }

    .stat-item {
        padding: 2px 5px;
        font-size: 0.7rem;
    }

    #garage-preview-container canvas {
        transform: scale(0.6);
    }
}