body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom right, #000000, #8B0000, #FFFFFF); /* Preto, Vermelho Escuro, Branco */
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
}

header {
    text-align: center;
    padding: 20px 0;
}

header h1 {
    font-family: 'Bebas Neue', sans-serif; /* Fonte mais impactante e formal */
    font-size: 3.5em;
    color: #FFD700; /* Dourado para destaque */
    margin-bottom: 10px;
}

header p {
    font-size: 1.3em;
    color: #F1F1F1;
}

main {
    background-color: rgba(0, 0, 0, 0.7); /* Fundo mais escuro */
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

h2 {
    font-family: 'Bebas Neue', sans-serif;
    color: #FFD700;
    text-align: center;
    margin-bottom: 20px;
}

#card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 15px;
    justify-items: center;
    margin-bottom: 20px;
}

.card-back {
    width: 90px;
    height: 130px;
    background-image: url("assets/card_back.jpg");
    background-size: cover;
    border: 2px solid #FFD700; /* Dourado */
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.card-back:hover {
    transform: scale(1.05);
}

#message-area {
    text-align: center;
    font-size: 1.2em;
    color: #F1F1F1;
    margin-top: 20px;
}

#selected-card-display {
    text-align: center;
}

#selected-card-display img {
    max-width: 220px;
    height: auto;
    border: 4px solid #FFD700;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 20px;
}

#selected-card-display h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5em;
    color: #FFD700;
    margin-bottom: 10px;
}

#selected-card-display p {
    font-size: 1.2em;
    color: #F1F1F1;
    line-height: 1.6;
}

.buttons button {
    background-color: #8B0000; /* Vermelho Escuro */
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 10px;
    transition: background-color 0.3s ease;
}

.buttons button:hover {
    background-color: #B22222; /* Vermelho Fogo */
}

#info-section {
    margin-top: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 15px;
}

#info-section p {
    color: #F1F1F1;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #F1F1F1;
}

/* Estilos para overlay de vídeo */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    border-radius: 15px;
}

/* Container para vídeos locais */
.video-container {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    max-height: 90%;
}

.card-video {
    width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

/* Controles personalizados de vídeo */
.video-controls {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 0 0 10px 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn {
    background-color: #8B0000;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.control-btn:hover {
    background-color: #B22222;
}

.progress-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 10px;
    min-width: 200px;
}

.progress-bar {
    flex-grow: 1;
    height: 5px;
    background: #333;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
}

.progress-bar::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.time-display {
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.volume-icon {
    font-size: 16px;
}

.volume-slider {
    width: 80px;
    height: 5px;
    background: #333;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Container para vídeos do YouTube */
.youtube-container {
    width: 90%;
    max-width: 800px;
    height: 70vh;
    max-height: 450px;
}

.youtube-video {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

.video-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background-color: #8B0000;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    z-index: 3;
}

.video-close-btn:hover {
    background-color: #B22222;
}

/* Garantir que o container da imagem tenha posição relativa */
#selected-card-display {
    position: relative;
}

.card-image-container {
    position: relative;
    display: inline-block;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .video-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .progress-container {
        min-width: 100%;
        order: -1;
    }
    
    .volume-container {
        justify-content: center;
    }
    
    .youtube-container {
        width: 95%;
        height: 60vh;
    }
    
    .video-container {
        max-width: 95%;
    }
}
