* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #0b0f1a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #141a28;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid #2a3346;
}

header h1 {
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 10px #3b82f6;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.video-card {
    background: #1e2537;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid #2f3b54;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

.video-thumbnail {
    background: #2a3346;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #5f6b8a;
    transition: color 0.2s;
}

.video-card:hover .video-thumbnail {
    color: #3b82f6;
}

.video-title {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    background: rgba(0,0,0,0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 40px #3b82f6;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 0 10px black;
    transition: color 0.2s;
}

.close:hover {
    color: #3b82f6;
}

#player {
    width: 100%;
    max-height: 80vh;
    display: block;
    background: black;
}

/* Сообщение, если видео нет */
.no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    font-size: 1.5rem;
    color: #6b7a99;
    background: #1e2537;
    border-radius: 40px;
}