:root {
    --bg-color: #1a0505;
    --text-color: #ffe6e6;
    --accent-color: #ff004c;
    --glass-bg: rgba(50, 0, 0, 0.15);
    --glass-border: rgba(255, 0, 76, 0.2);
    --error-color: #ff3333;
    --card-hover-shadow: 0 15px 35px rgba(255, 0, 76, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(-45deg, #1a0000, #4a0010, #2b0000, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Removed static background to let body gradient show through, or use a semi-transparent overlay */
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.login-box:hover {
    box-shadow: 0 8px 40px 0 rgba(255, 0, 76, 0.25);
}

.login-box h1 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1.8rem;
    text-shadow: 0 0 15px rgba(255, 0, 76, 0.4);
}

.login-desc {
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1rem;
    color: #ffcccc;
    letter-spacing: 0.5px;
    font-style: italic;
}

.login-box input {
    width: 100%;
    padding: 15px;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.login-box input:focus {
    border-color: var(--accent-color);
}

.login-box button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--accent-color);
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.login-box button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.error {
    color: var(--error-color);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Main Content */
header {
    padding: 3rem 2rem;
    text-align: center;
    background: transparent;
    /* Remove gradient to show body bg */
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 0, 76, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.info-text {
    font-size: 0.9rem;
    color: rgba(255, 200, 200, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

#catalog-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.pack-section {
    margin-bottom: 4rem;
}

.pack-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 0, 76, 0.4);
    padding-bottom: 0.5rem;
    display: inline-block;
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(255, 0, 76, 0.5);
    font-family: 'Outfit', serif;
    /* Maybe switch to serif for elegance if available, otherwise stick to sans */
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    aspect-ratio: 9/16;
    /* Portrait aspect ratio for cards */
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.video-thumbnail {
    width: 100%;
    height: 80%;
    object-fit: cover;
    background: #000;
}

.video-card .play-icon {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    transition: color 0.3s;
    pointer-events: none;
}

.video-card:hover .play-icon {
    color: var(--accent-color);
}

.video-description {
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 0.9rem;
    color: #ddd;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(5px);
    width: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .pack-title {
        font-size: 1.5rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .video-card {
        border-radius: 8px;
    }

    .video-description {
        font-size: 0.8rem;
        padding: 10px;
    }

    .login-box {
        padding: 2rem 1.5rem;
        width: 90%;
        max-width: 350px;
    }

    .login-box h1 {
        font-size: 1.5rem;
    }

    .login-desc {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .login-box input,
    .login-box button {
        padding: 14px;
        /* Larger touch target */
        font-size: 1rem;
    }

    .video-wrapper {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 9/16;
        /* Fallback for mobile players often being full screen */
        max-height: 80vh;
    }

    #video-watermark {
        font-size: 1rem;
        top: 10px;
        left: 10px;
        padding: 3px 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Video Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper {
    position: relative;
    height: 90vh;
    width: auto;
    max-width: 90vw;
    aspect-ratio: auto;
    /* Remove fixed aspect ratio */
    background: #000;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-video {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

#video-watermark {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to video for play/pause */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.control-btn {
    pointer-events: auto;
    /* Re-enable clicks for buttons */
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
}

#quit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Hide prev/next buttons if mouse is inactive could be a nice touch, but keep simple for now */