/* Estilos base */
body {
    font-family: monospace;
    background-color: #222;
    color: #0f0;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* Header horizontal */
.ascii-header {
    margin-bottom: 30px;
    padding: 10px 20px;
    border-bottom: 1px dashed #0f0;
    position: sticky;
    top: 0;
    background-color: #222;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.site-title {
    flex: 0 0 auto;
}

.header-logo {
    font-size: 10px;
    line-height: 1.2;
    color: #0f8;
    text-shadow: 0 0 3px #0f8;
    margin: 0;
    text-align: left;
}

.ascii-nav {
    flex: 0 0 auto;
}

.ascii-nav ul {
    display: flex;
    justify-content: flex-end;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.ascii-nav li {
    margin: 0 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ascii-nav li:hover {
    transform: translateY(-3px);
}

.ascii-nav li.active-nav .nav-item,
.ascii-nav li a:hover .nav-item {
    color: #ff0;
    text-shadow: 0 0 5px #ff0;
}

.nav-item {
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    margin: 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.ascii-nav li:hover .nav-item {
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
}

.ascii-nav a {
    text-decoration: none;
    color: inherit;
}

/* Conteúdo principal */
.content-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.game-page-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.section-title {
    margin: 30px 0;
}

.section-title pre {
    font-size: 14px;
    color: #ff0;
    text-shadow: 0 0 5px #ff0;
    margin: 0 auto;
}

/* Cards de jogos */
.game-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.game-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 15px #0f0;
}

.game-card-ascii {
    font-size: 12px;
    line-height: 1.2;
    color: #0f0;
    text-shadow: 0 0 2px #0f0;
    margin: 0;
}

.game-card#blackjack-card:hover .game-card-ascii {
    color: #0f8;
    text-shadow: 0 0 5px #0f8;
}

.game-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 0 5px #888;
}

/* Footer */
.ascii-footer {
    margin-top: 50px;
    padding: 10px 0;
    border-top: 1px dashed #0f0;
}

.ascii-footer pre {
    font-size: 10px;
    color: #0f8;
    margin: 0 auto;
}

/* Logo Blackjack */
.logo {
    font-size: 14px; 
    line-height: 1.2; 
    color: #0f0; 
    text-shadow: 0 0 5px #0f0;
    max-width: 800px;
    margin: 20px auto;
}

.author-credit {
    margin-top: 0px; 
    margin-bottom: 20px; 
    color: #0f8; 
    font-weight: bold; 
    text-shadow: 0 0 3px #0f8;
}

/* Telas do jogo */
.screens {
    display: none;
}

.screens.show-game {
    display: block;
}

/* Estilos originais do jogo */
.game-container {
    border: 1px solid #0f0;
    padding: 20px;
    margin-top: 20px;
}

.cards {
    font-size: 14px;
    white-space: pre;
    line-height: 1.2;
    margin: 10px 0;
}

.dealer-area, .player-area {
    margin: 15px 0;
    padding: 10px;
    border: 1px dashed #0f0;
    position: relative;
}

.player-area.active {
    border: 1px solid #ff0;
    box-shadow: 0 0 10px #ff0;
}

.player-area.win {
    border: 1px solid #0f0;
    box-shadow: 0 0 10px #0f0;
}

.player-area.lose {
    border: 1px solid #f00;
    box-shadow: 0 0 10px #f00;
}

.player-area.push {
    border: 1px solid #00f;
    box-shadow: 0 0 10px #00f;
}

.player-area.bust {
    border: 1px solid #f00;
    text-decoration: line-through;
}

.actions {
    margin: 20px 0;
}

button {
    background-color: #000;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 8px 16px;
    margin: 0 5px 10px 5px;
    cursor: pointer;
    font-family: monospace;
}

button:hover {
    background-color: #0f0;
    color: #000;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message {
    margin: 20px 0;
    font-size: 18px;
    font-weight: bold;
    min-height: 24px;
}

/* Screens do Blackjack */
#start-screen, #lobby-screen, #game-screen {
    display: none;
}

#start-screen.active, #lobby-screen.active, #game-screen.active {
    display: block;
}

.lobby-container {
    margin: 20px 0;
}

.player-list {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
    border: 1px dashed #0f0;
    padding: 10px;
}

.room-code {
    font-size: 24px;
    margin: 20px 0;
    padding: 10px;
    background-color: #000;
    border: 1px solid #0f0;
    display: inline-block;
}

input[type="text"] {
    background-color: #000;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 8px 16px;
    margin: 10px 5px;
    font-family: monospace;
    width: 200px;
}

.player-name {
    position: absolute;
    top: 0;
    left: 5px;
    font-size: 14px;
    color: #ff0;
}

.player-score {
    position: absolute;
    top: 0;
    right: 5px;
    font-size: 14px;
}

.player-wins {
    position: absolute;
    bottom: 0;
    right: 5px;
    font-size: 14px;
    color: #ff0;
}

.player-status {
    position: absolute;
    bottom: 0;
    left: 5px;
    font-size: 14px;
}

.hidden-card {
    color: #f00;
}

.room-info {
    margin: 20px 0;
}

/* Loading spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    display: none;
}

.loading.active {
    display: flex;
}

.spinner {
    border: 4px solid #000;
    border-top: 4px solid #0f0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #f00;
    margin: 10px 0;
    font-weight: bold;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    .site-title {
        margin-bottom: 15px;
    }
    
    .ascii-nav ul {
        justify-content: center;
    }
    
    .game-cards {
        flex-direction: column;
        align-items: center;
    }
}