/* --- GERAL --- */
:root {
    --xmas-red: #d42426;
    --xmas-gold: #f1c40f;
    --text-light: #fdfbf7;
}
body { font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; padding: 0; }

/* --- TEMA DE NATAL (GLOBAL) --- */
body.xmas-theme {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: var(--text-light);
    min-height: 100vh;
    background-attachment: fixed;
}
#snow-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* CARTÃO DE UPLOAD (INDEX) - Agora fluido */
.main-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 20px;
    border: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    z-index: 1;
    overflow: hidden;
    margin: 0 auto;
    /* Removemos o max-width fixo daqui, o Bootstrap trata disso */
}

/* --- VÍDEO RESPONSIVO --- */
.video-header {
    width: 100%;
    background: #000;
    border-bottom: 4px solid var(--xmas-gold);
    overflow: hidden;
    position: relative;
    /* Altura Padrão (Mobile/Laptop) */
    height: 200px; 
    transition: height 0.3s ease;
}
.video-header video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- AJUSTES PARA ECRÃS GRANDES (MAC/4K) --- */
@media (min-width: 1600px) {
    /* Em ecrãs grandes, o vídeo fica mais alto para não parecer uma fita fina */
    .video-header { height: 350px; }
    
    /* Aumentar o texto para ser legível em 4K */
    .main-card h1 { font-size: 2.5rem; }
    .upload-zone h5 { font-size: 1.5rem; }
    .btn-xmas { font-size: 1.5rem; padding: 20px; }
}

/* Área Upload */
.upload-zone {
    border: 3px dashed #ccc; border-radius: 15px; background: #f8f9fa;
    padding: 30px 20px; text-align: center; cursor: pointer; position: relative;
    transition: 0.3s;
}
.upload-zone:hover { border-color: var(--xmas-red); background: #fff5f5; }
.upload-zone input { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0; cursor: pointer; }

.btn-xmas {
    background: var(--xmas-red); border: none; color: white; padding: 15px;
    font-size: 1.2rem; font-weight: bold; border-radius: 10px; width: 100%;
    transition: 0.2s;
}
.btn-xmas:hover { background: #b01b1d; transform: scale(1.02); }

/* --- CABEÇALHO DA GALERIA --- */
.minimal-header { 
    text-align: center; padding: 30px 20px; margin-bottom: 20px;
    background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative; z-index: 2;
}
.minimal-header h1 { 
    font-weight: 300; letter-spacing: 3px; text-transform: uppercase; margin: 0; font-size: 1.5rem;
    color: var(--xmas-gold); text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* --- GRELHA GALERIA (Ajustada para 4K) --- */
.gallery-grid {
    column-count: 2; column-gap: 15px; padding: 15px;
    margin: 0 auto; position: relative; z-index: 2;
    max-width: 100%; /* Ocupa o ecrã todo se necessário */
}
@media (min-width: 768px) { .gallery-grid { column-count: 3; } }
@media (min-width: 1200px) { .gallery-grid { column-count: 4; } }
@media (min-width: 1600px) { .gallery-grid { column-count: 5; } }
@media (min-width: 2000px) { .gallery-grid { column-count: 6; } } /* 4K */

.gallery-item {
    break-inside: avoid; margin-bottom: 15px; cursor: zoom-in;
    transition: transform 0.3s; background: white; padding: 5px; border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.gallery-item:hover { transform: translateY(-5px); z-index: 10; }
.gallery-item img { width: 100%; height: auto; display: block; border-radius: 2px; }

/* Lightbox */
.lightbox { display: none; position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); flex-direction: column; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 80vh; box-shadow: 0 0 50px rgba(255,255,255,0.1); border-radius: 4px; border: 2px solid #333; }
.close-btn { position: absolute; top: 20px; right: 30px; font-size: 3rem; cursor: pointer; color: #fff; }
.btn-download { margin-top: 20px; padding: 10px 30px; border: 2px solid var(--xmas-gold); color: var(--xmas-gold); text-decoration: none; text-transform: uppercase; font-weight: bold; font-size: 0.9rem; transition: 0.2s; background: transparent; border-radius: 30px; }
.btn-download:hover { background: var(--xmas-gold); color: #000; }



/* --- BOTÃO DE MÚSICA FLUTUANTE --- */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 2px solid var(--xmas-gold);
    color: var(--xmas-gold);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

.music-control:hover {
    background: var(--xmas-gold);
    color: #000;
    transform: scale(1.1) rotate(10deg);
}

/* Animação quando a música toca */
.music-playing {
    animation: pulse-music 2s infinite;
    background: rgba(241, 196, 15, 0.2);
}

@keyframes pulse-music {
    0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(241, 196, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}
