body {
    font-family: 'Crimson Text', 'Georgia', 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom right, #2c073f, #4b0082, #0c0032);
    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-size: 3em;
    color: #d4af37;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(106, 13, 173, 0.7);
    font-family: 'Cinzel', 'UnifrakturMaguntia', 'Times New Roman', serif;
}

header p {
    font-size: 1.2em;
    color: #c0c0c0;
    font-family: 'Crimson Text', 'Georgia', serif;
}

main {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #4b0082;
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.4);
}

h2 {
    color: #d4af37;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Cinzel', 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(44, 7, 63, 0.5);
}

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

.card-back {
    width: 80px;
    height: 120px;
    background-image: url("assets/card_back.jpg");
    background-size: cover;
    border: 2px solid #4b0082;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(106, 13, 173, 0.5);
}

.card-back:hover {
    transform: scale(1.05);
    border-color: #d4af37;
}

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

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

#selected-card-display img {
    max-width: 175px;
    height: auto;
    border: 4px solid #4b0082;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
    margin: 0 auto 20px auto;
    display: block;
}

#selected-card-display h3 {
    font-size: 2em;
    color: #d4af37;
    margin-bottom: 10px;
    font-family: 'Cinzel', 'UnifrakturMaguntia', 'Times New Roman', serif;
}

#selected-card-display p {
    font-size: 1.1em;
    color: #c0c0c0;
    line-height: 1.5;
    font-family: 'Crimson Text', 'Georgia', serif;
}

.buttons button {
    background-color: #4b0082;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 10px;
    transition: background-color 0.3s ease;
    font-family: 'Crimson Text', 'Georgia', serif;
}

.buttons button:hover {
    background-color: #6a0dad;
}

#info-section {
    margin-top: 40px;
    background-color: rgba(44, 7, 63, 0.4);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #4b0082;
}

#info-section p {
    color: #c0c0c0;
    line-height: 1.5;
    font-family: 'Crimson Text', 'Georgia', serif;
}

footer {
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    border-top: 10px solid rgba(75, 0, 130, 0.3);
    color: #c0c0c0;
    font-family: 'Crimson Text', 'Georgia', serif;
}

#media-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#selected-card-video {
    max-width: 200px;
    width: 100%;
    height: auto;
    border: 8px solid #4b0082;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
}

#selected-card-youtube {
    max-width: 200px;
    width: 100%;
    height: 275px;
    border: 4px solid #4b0082;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
}

#selected-card-image {
    max-width: 200px;
    height: auto;
    border: 6px solid #4b0082;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
}

#selected-card-video {
    position: relative;
    width: 50%;
    max-width: 175px;
    margin: 0 auto 10px auto;
}

#selected-card-video iframe {
    width: 95%;
    height: 325px;
    border: 6px solid #4b0082;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.7);
}

@media (max-width: 768px) {
    #selected-card-video iframe {
        height: 200px;
    }
    
    #selected-card-youtube {
        height: 275px;
    }
}