@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --bg: #0D0B14;
    --bg-surface: #1A1625;
    --text: #F5F2E8;
    --accent-rose: #FF2D6E;
    --accent-bleu: #3DB4FF;
    --accent-violet: #8B2FE0;
    --accent-jaune: #FFD23D;
    --font-display: "Bungee", sans-serif;
    --font-mono: "Space Mono", monospace ;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    line-height: 1.5;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    flex-direction: column;
    margin: 0;
}

.main {
    background-color: var(--accent-bleu);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    transition: transform 0.2s;
    width: min(500px, 90vw);
    text-align: center;
}

h1 {
    font-family: var(--font-display);
    color: var(--text);
}

label {
    display: block;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: left;
    color: #555;
    font-weight: bold;
}

input {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    border: none;
    color: white;
    cursor: pointer;
    background-color: #4CAF50;
    width: 100%;
    font-size: 16px;
}

.wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    padding: 15px 5vw;
    background-color: var(--bg-surface);
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: bold;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent-rose);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 20px;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
}

.video-card {
    background-color: var(--bg-surface);
    padding: 20px;
    border: 2px solid transparent;
    clip-path: polygon(0 12px, 12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    transition: border-color 0.2s;
}

.video-card:hover {
    border-color: var(--accent-rose);
}

.video-player {
    width: 100%;
    display: block;
}

#cinema-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 10;
}

#cinema-close {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 30;
    background: transparent;
    border: 2px solid var(--text);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

#cinema-close:hover {
    color: var(--accent-rose);
    border-color: var(--accent-rose);
    box-shadow: 0 0 12px var(--accent-rose), 0 0 24px var(--accent-rose);
}

body.theater-mode .video-card {
    display: none;
}

body.theater-mode .video-card.active {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1400px;
    z-index: 20;
    background: transparent;
    clip-path: none;
    border: none;
}

body.theater-mode .video-card.active .video-player {
    width: 100%;
    max-height: 80vh;
}

.video-card {
    position: relative;
}

.video-click-catcher {
    position: absolute;
    inset: 0;
    z-index: 5;
    cursor: pointer;
}

body.theater-mode .video-card.active .video-click-catcher {
    display: none;
}