@import url("../style.css");

/* ========================================= */
/* GLOBAL STYLES & VARIABLES (Tech Noir) */
/* ========================================= */
:root {
    --primary-color: #e6e6e6;
    --secondary-color: #3b5b6b;
    --background-dark: #8e8b85;
    --card-bg: #f1f1f1f3;
    --text-light: #313232;
    --surface-color: #1f2831;
    --accent-glow: rgba(193, 157, 157, 0.4); 
    --border-radius: 8px;
}

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

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: var(--background-dark);
    color: var(--text-light);
    line-height: 1.0;
    font-size: 1.5em;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* ========================================= */
/* PASSWORD OVERLAY (Gatekeeper) */
/* ========================================= */
#password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-box {
    background-color: var(--surface-color);
    padding: 50px;
    border-radius: 15px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-box h2 {
    border: none;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: var(--primary-color);
}

.login-box p {
    margin-bottom: 30px;
    font-size: 0.9em;
    opacity: 0.8;
}

#vault-password {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--secondary-color);
    background: #1a1a1a;
    color: white;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2em;
    text-align: center;
}

.error-text {
    color: #ff4d4d;
    font-size: 0.8em;
    margin-top: 15px;
    display: none;
}

/* ========================================= */
/* FIX FOR LAYOUT BROKENNESS */
/* ========================================= */
#vault-content {
    width: 100%;
    display: block;
    min-height: 100vh;
    position: relative;
}

/* ========================================= */
/* LAYOUT & COMPONENTS */
/* ========================================= */
main {
    padding: 40px 5%;
}

.banner-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

.banner-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.gif-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 1;
}

.asset-status {
    text-align: center;
    padding: 15px 20px;
    background-color: var(--surface-color);
    border-bottom: 3px solid rgba(3, 29, 29, 0.176);
}

.asset-filter-controls {
    text-align: center;
    padding: 20px;
}

.asset-filter-controls h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.gif-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gif-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.gif-card img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 450px;
    object-fit: contain;
}

.card-info {
    padding: 20px;
    text-align: center;
}

.card-info h4 {
    margin-bottom: 8px;
    font-size: 1.2em;
    color: #f8f9fc;
    font-weight: 600;
}

.card-info p {
    margin-bottom: 25px;
    opacity: 0.7;
}

button, .download-btn {
    cursor: pointer;
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s;
    background-color: var(--primary-color);
    color: rgb(28, 27, 27);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

button:hover, .download-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

button:active, .download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.modal-content {
    background-color: #1e1e1e;
    margin: auto;
    width: 90%;
    max-width: 1000px;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

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

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 45px;
    cursor: pointer;
    background: none;
    border: none;
    color: #aaa;
}

.modal-media-container {
    text-align: center;
    margin-bottom: 30px;
    overflow: visible;
}

#modal-image {
    display: block;
    width: 80%;
    height: auto;
    object-fit: contain;
}

.modal-info h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2em;
}

#modal-description {
    margin-bottom: 30px;
    opacity: 0.9;
    padding: 10px;
    border-left: 4px solid var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
        border-radius: 10px;
    }

    .logo { font-size: 0.5em; }
    .nav-links a { font-size: 0.7rem; padding: 4px 6px; }
    
    .banner-container {
        height: 200px;
    }
}
