/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: #ffff00;
    background-color: #121212;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hyperpop Background Elements */
.y2k-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #f953c6, #b91d73, #7303c0, #ec38bc, #fdeff9);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    opacity: 0.2;
    z-index: -2;
}

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

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/noise.png');
    background-size: 100px 100px;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.cyber-text {
    font-family: 'Arial', sans-serif;
    font-weight: 800;
    color: #f953c6;
    text-shadow: 
        3px 3px 0 #fdeff9,
        -3px -3px 0 #7303c0;
    letter-spacing: -1px;
}

.blink {
    animation: blink 1s infinite;
    color: #fdeff9;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Header styles */
header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(249, 83, 198, 0.4);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #fdeff9;
    letter-spacing: -2px;
    text-transform: uppercase;
    transform: skew(-5deg);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.filter-btn {
    background-color: rgba(249, 83, 198, 0.2);
    border: 1px solid rgba(249, 83, 198, 0.5);
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    color: #fdeff9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
    border-radius: 20px;
    transform: skew(-5deg);
}

.filter-btn:hover {
    background-color: rgba(249, 83, 198, 0.3);
    border-color: #f953c6;
    box-shadow: 0 0 20px rgba(249, 83, 198, 0.5);
    transform: skew(-5deg) scale(1.05);
}

.filter-btn.active {
    background-color: #f953c6;
    color: #121212;
    box-shadow: 0 0 30px rgba(249, 83, 198, 0.7);
}

/* Main content and video grid */
main {
    padding: 2rem 0;
}

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

.video-card {
    background-color: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid rgba(249, 83, 198, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeIn 0.5s ease forwards;
    transform: rotate(0deg);
}

.video-card:nth-child(odd) {
    transform: rotate(1deg);
}

.video-card:nth-child(even) {
    transform: rotate(-1deg);
}

.video-card.hidden {
    display: none;
}

.video-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(249, 83, 198, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
    pointer-events: none;
    z-index: 1;
}

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

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.video-card:hover {
    transform: translateY(-5px) scale(1.03) rotate(0deg);
    box-shadow: 
        0 10px 25px rgba(249, 83, 198, 0.3),
        0 0 0 5px rgba(249, 83, 198, 0.1);
    z-index: 2;
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(18,18,18,0) 0%, 
        rgba(249,83,198,0.3) 100%);
    z-index: 1;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: saturate(1.2) contrast(1.1);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
    filter: saturate(1.5) contrast(1.2);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    background-color: rgba(249, 83, 198, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-card:hover .play-button {
    opacity: 1;
    animation: pulse 2s infinite;
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 83, 198, 0.8);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(249, 83, 198, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(249, 83, 198, 0);
    }
}

.play-button i {
    font-size: 1.2rem;
}

.video-info {
    padding: 1.2rem;
    position: relative;
    border-top: 2px solid rgba(249, 83, 198, 0.2);
    background: linear-gradient(to bottom, 
        rgba(18,18,18,0.8),
        rgba(58,12,44,0.5)
    );
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fdeff9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 900;
    font-family: 'Arial', sans-serif;
}

.video-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.category {
    color: #f953c6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer styles */
footer {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 2px solid rgba(249, 83, 198, 0.3);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.95);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    position: relative;
    background-color: #121212;
    margin: 5% auto;
    padding: 25px;
    width: 80%;
    max-width: 900px;
    border: 2px solid rgba(249, 83, 198, 0.4);
    box-shadow: 0 0 50px rgba(249, 83, 198, 0.3);
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #f953c6;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #fff;
    text-shadow: 0 0 10px #f953c6;
    transform: rotate(90deg);
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 1.5rem;
    border: 2px solid rgba(249, 83, 198, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

/* Plyr styling */
.video-container .plyr {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Make sure the YouTube player is full size */
.video-container #player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Custom Plyr controls styling */
.plyr--full-ui input[type=range] {
    color: #f953c6;
}

.plyr__control--overlaid {
    background: rgba(249, 83, 198, 0.8);
}

.plyr--video .plyr__control:hover {
    background: #f953c6;
}

.plyr--video .plyr__control.plyr__tab-focus {
    background: #f953c6;
    box-shadow: 0 0 0 5px rgba(249, 83, 198, 0.5);
}

.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before {
    background: #f953c6;
}

#modal-title {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
    color: #fdeff9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 900;
    font-family: 'Arial', sans-serif;
}

#modal-info {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Description styling */
.description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(249, 83, 198, 0.1);
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid #f953c6;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* Hyperpop distortion effect */
@keyframes glitch {
    0% {
        text-shadow: 
            0.05em 0 0 rgba(255, 0, 0, 0.75),
            -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
            0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    14% {
        text-shadow: 
            0.05em 0 0 rgba(255, 0, 0, 0.75),
            -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
            0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    15% {
        text-shadow: 
            -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
            -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    49% {
        text-shadow: 
            -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
            -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    50% {
        text-shadow: 
            0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
            0.05em 0 0 rgba(0, 255, 0, 0.75),
            0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    99% {
        text-shadow: 
            0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
            0.05em 0 0 rgba(0, 255, 0, 0.75),
            0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    100% {
        text-shadow: 
            -0.025em 0 0 rgba(255, 0, 0, 0.75),
            -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
            -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
}

header h1:hover, .video-info h3:hover {
    animation: glitch 1.5s infinite;
}
