/*
 * GEAR/ARMORY STYLES
 * This file contains all CSS for the player customization/gear screen.
 */

#gear-content {
    width: 90%;
    max-width: 800px;
    max-height: 85vh; /* Slightly more height */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Let this container handle all the scrolling */
    overflow-y: auto;
}

/* Custom Scrollbar for Gear Menu */
#gear-content::-webkit-scrollbar { width: 10px; }
#gear-content::-webkit-scrollbar-track { background: transparent; }
#gear-content::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
    border: 3px solid transparent;
    background-clip: content-box;
}
#gear-content::-webkit-scrollbar-thumb:hover { background-color: var(--secondary-color); }


/* Add animation classes for opening/closing */
#gear-content.anim-pop-in {
    animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
#gear-content.anim-pop-out {
    animation: pop-out 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}


#gear-content h2 {
    text-align: center;
    font-family: var(--font-title);
    /* Responsive font size */
    font-size: clamp(2rem, 8vw, 3rem);
    color: var(--primary-color);
    margin-bottom: 0;
}

.gear-grid-container {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 12px;
    overflow: hidden; /* Helps contain children */
    display: flex;
    flex-direction: column;
}

.gear-grid-container h3 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 1rem;
    color: #ccc;
}

.gear-grid {
    display: grid;
    /* This is already a great responsive pattern! */
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
    /* Removed max-height to allow parent to scroll */
}

.gear-item {
    aspect-ratio: 1 / 1;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.gear-item-name {
    font-family: var(--font-display);
    /* Responsive font size */
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 700;
}

.gear-item-unlock {
    /* Responsive font size */
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    color: #aaa;
}

/* --- STATES --- */

.gear-item.locked {
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2) 5px, rgba(0,0,0,0.3) 5px, rgba(0,0,0,0.3) 10px);
    color: #666;
    cursor: not-allowed;
}

.gear-item.unlocked {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.gear-item.unlocked:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.gear-item.equipped {
    border-color: var(--success-color);
    box-shadow: 0 0 15px var(--success-color);
    color: var(--success-color);
}

#save-gear-btn {
    margin-top: 1rem;
    align-self: center;
}

/* --- Mobile Scaling --- */
@media (max-width: 768px) {
    #gear-content {
        width: 95vw;
        max-height: 90vh;
        padding: 1rem;
    }
    .gear-grid {
        /* Make items a bit smaller on mobile to fit more */
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

/*
 * -------------------------
 * NEW: ACTUAL GEAR SKINS
 * -------------------------
 */

/* --- Grid Skins --- */
.game-grid.grid-skin-light-shadow {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.game-grid.grid-skin-inset {
    background: radial-gradient(circle, #2a2a2a 0%, #111111 90%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    border: 1px solid #444;
}

.game-grid.grid-skin-inverted {
    background: radial-gradient(circle, #ffffff 0%, #dddddd 90%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
    border: 1px solid #bbb;
}

/* --- Arrow Skins --- */
.arrow-skin-light-shadow {
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5));
}

.arrow-skin-light-shadow .arrow-bg {
    fill: #222222; 
}

.arrow-skin-light-shadow.arrow-up .arrow-shape {
    fill: var(--primary-color);
}
.arrow-skin-light-shadow.arrow-down .arrow-shape {
    fill: var(--danger-color);
}
.arrow-skin-light-shadow.arrow-left .arrow-shape {
    fill: var(--secondary-color);
}
.arrow-skin-light-shadow.arrow-right .arrow-shape {
    fill: var(--success-color);
}

/* --- Inset Skin Style --- */
.arrow-skin-inset {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.arrow-skin-inset .arrow-bg {
    fill: #111; /* The black squircle */
}
.arrow-skin-inset.arrow-up .arrow-shape {
    fill: var(--primary-color);
}
.arrow-skin-inset.arrow-down .arrow-shape {
    fill: var(--danger-color);
}
.arrow-skin-inset.arrow-left .arrow-shape {
    fill: var(--secondary-color);
}
.arrow-skin-inset.arrow-right .arrow-shape {
    fill: var(--success-color);
}

/* --- Inverted Skin Style --- */
.arrow-skin-inverted {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.arrow-skin-inverted .arrow-bg {
    fill: #f5f5f5; /* The white squircle */
}
.arrow-skin-inverted.arrow-up .arrow-shape {
    fill: var(--primary-color);
}
.arrow-skin-inverted.arrow-down .arrow-shape {
    fill: var(--danger-color);
}
.arrow-skin-inverted.arrow-left .arrow-shape {
    fill: var(--secondary-color);
}
.arrow-skin-inverted.arrow-right .arrow-shape {
    fill: var(--success-color);
}
