body {
    font-family: 'Roboto', sans-serif;
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    text-align: center;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#setup-screen, #game-screen, #card-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#setup-screen h1, #setup-screen h2 {
    font-size: 2.5em;
    color: #FFD700; /* Gold */
    margin-bottom: 20px;
}

#main-menu {
    text-align: center;
}

#main-menu h1 {
    font-size: 3.5em;
    color: #FFD700;
    margin-bottom: 40px;
}

#menu-buttons button {
    display: block;
    width: 300px;
    margin: 15px auto;
    padding: 20px;
    font-size: 1.5em;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border: 2px solid #FFD700;
    border-radius: 10px;
    background: linear-gradient(45deg, #b8860b, #ffd700);
    color: #333;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
}

#menu-buttons button:hover {
    background: linear-gradient(45deg, #ffd700, #b8860b);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

#room-selection p {
    font-size: 1.2em;
    margin-bottom: 15px;
}

#room-selection button, #player-selection button, #game-over-screen button, #turn-controls button {
    margin: 10px;
    padding: 15px 30px;
    font-size: 1.1em;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border: 2px solid #FFD700;
    border-radius: 10px;
    background: linear-gradient(45deg, #b8860b, #ffd700);
    color: #333;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
}

#room-selection button:hover, #player-selection button:hover, #game-over-screen button:hover, #turn-controls button:hover {
    background: linear-gradient(45deg, #ffd700, #b8860b);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#room-selection input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-right: 10px;
    font-size: 1em;
    width: 200px;
}

.hidden {
    display: none;
}

#players-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.player-area {
    border: 2px solid #b8860b;
    border-radius: 15px;
    padding: 20px;
    flex: 1;
    background-color: rgba(20, 20, 20, 0.7);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.player-area.active {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-5px);
}

.player-area h3 {
    color: #ffd700;
    margin-top: 0;
}

.hand, .field {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    min-height: 180px;
}

.hand h4, .field h4 {
    margin: 0 0 10px 0;
    color: #fff;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 5px;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    min-height: 160px;
}

.card-back {
    width: 110px;
    height: 160px;
    background: linear-gradient(45deg, #2c3e50, #4a69bd);
    border: 2px solid #b8860b;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: #ffd700;
    font-family: 'Cinzel', serif;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.card {
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 10px;
    width: 110px;
    height: 160px;
    background-color: #fdf6e3;
    color: #333;
    text-shadow: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.3);
}

.card.attack {
    /* No rotation needed */
}

.card.defense {
    transform: rotate(90deg);
    margin: 35px 5px;
}

.card.tapped {
    opacity: 0.6;
    filter: grayscale(80%);
}

.card .name {
    font-weight: bold;
    font-size: 16px;
    color: #8B4513; /* SaddleBrown */
    font-family: 'Cinzel', serif;
}

.card .type {
    font-style: italic;
    font-size: 12px;
    color: #666;
    align-self: center;
}

.card .stats {
    font-size: 14px;
    font-weight: bold;
    align-self: flex-end;
    color: #c0392b;
    background-color: rgba(255, 215, 0, 0.2);
    padding: 2px 5px;
    border-radius: 5px;
}

#turn-controls {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#game-over-screen h2 {
    font-size: 4em;
    color: #FFD700;
    margin-bottom: 20px;
}

#card-gallery h2 {
     font-size: 2.5em;
    color: #FFD700;
    margin-bottom: 20px;
}

#gallery-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

/* Estilo da barra de rolagem para a galeria */
#gallery-container::-webkit-scrollbar {
  width: 10px;
}
#gallery-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}
#gallery-container::-webkit-scrollbar-thumb {
  background: #b8860b;
  border-radius: 10px;
}
#gallery-container::-webkit-scrollbar-thumb:hover {
  background: #ffd700;
}
