@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background-color: #f4f4f4; }

/* Estilos do Dashboard */
.dashboard-container { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%); color: white; padding: 20px; position: fixed; height: 100%; box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2); transition: width 0.3s ease; }
.sidebar-header { text-align: center; margin-bottom: 30px; }
.sidebar-title { font-size: 24px; font-weight: 600; letter-spacing: 1px; }
.menu-dashboard { list-style: none; }
.menu-item { margin-bottom: 10px; }
.menu-link { display: flex; align-items: center; padding: 12px 15px; color: white; text-decoration: none; border-radius: 8px; transition: background-color 0.3s ease, transform 0.2s ease; }
.menu-link i { margin-right: 10px; font-size: 18px; }
.menu-link:hover, .menu-link.active { background-color: #d81b60; transform: translateX(5px); }
.main-content { margin-left: 280px; padding: 40px; flex-grow: 1; background-color: #f4f4f4; }
.auth-container { max-width: 450px; margin: 0 auto; background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); }
.auth-container h2 { text-align: center; margin-bottom: 20px; color: #333; font-size: 24px; font-weight: 600; }
.tabs { display: flex; justify-content: center; margin-bottom: 20px; }
.tab-button { padding: 12px 25px; font-size: 16px; font-weight: 600; color: #666; background-color: #f0f0f0; border: none; border-radius: 10px 10px 0 0; cursor: pointer; transition: all 0.3s ease; }
.tab-button.active { background-color: #d81b60; color: white; }
.tab-button:hover { background-color: #e0e0e0; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.game-form { display: flex; flex-direction: column; gap: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 5px; }
.form-group input { padding: 12px; font-size: 16px; border: 1px solid #ddd; border-radius: 8px; outline: none; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-group input:focus { border-color: #d81b60; box-shadow: 0 0 5px rgba(216, 27, 96, 0.3); }
.submit-button { padding: 12px; font-size: 16px; font-weight: 600; color: white; background: linear-gradient(90deg, #d81b60, #f06292); border: none; border-radius: 8px; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; }
.submit-button:hover { background: linear-gradient(90deg, #b71c1c, #d81b60); transform: scale(1.02); }
.error-message { color: #b71c1c; font-size: 14px; margin-bottom: 15px; text-align: center; }
.content-section { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); margin-bottom: 20px; }
.content-section h2 { color: #333; font-size: 28px; font-weight: 600; margin-bottom: 20px; }
.user-info-card, .game-access-card { text-align: center; padding: 20px; border-radius: 10px; margin-bottom: 20px; }
.user-info-card { background: linear-gradient(145deg, #f9f9f9, #e0e0e0); }
.user-info-card p { margin: 10px 0; font-size: 16px; color: #333; }
.logout-button { display: inline-block; padding: 10px 20px; font-size: 14px; color: white; background: #666; border-radius: 8px; text-decoration: none; transition: background 0.3s ease, transform 0.2s ease; }
.logout-button:hover { background: #555; transform: scale(1.02); }
.game-access-card { background: linear-gradient(145deg, #2e7d32, #388e3c); color: white; }
.game-access-card h3 { margin: 0 0 10px; font-size: 20px; }
.game-access-card p { margin: 0 0 15px; font-size: 14px; }
.game-button { display: inline-block; padding: 12px 25px; font-size: 16px; font-weight: 600; color: white; background: linear-gradient(90deg, #d81b60, #f06292); border-radius: 8px; text-decoration: none; transition: background 0.3s ease, transform 0.2s ease; }
.game-button:hover { background: linear-gradient(90deg, #b71c1c, #d81b60); transform: scale(1.02); }
.lobby-section { text-align: left; }
.friend-request-form { margin-bottom: 20px; display: flex; gap: 10px; }
.friend-input { padding: 10px; font-size: 14px; border: 1px solid #ddd; border-radius: 8px; width: 200px; }
.send-request-button { padding: 10px 15px; font-size: 14px; font-weight: 600; color: white; background: #2e7d32; border: none; border-radius: 8px; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; }
.send-request-button:hover { background: #1b5e20; transform: scale(1.02); }
.lobby-section h3 { font-size: 20px; color: #333; margin-bottom: 10px; }
.friends-list, .friend-requests { list-style: none; padding: 0; }
.friends-list li, .friend-requests li { padding: 12px; background: #f0f0f0; margin-bottom: 8px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.play-button { padding: 6px 12px; font-size: 12px; font-weight: 600; color: white; background: #d81b60; border: none; border-radius: 5px; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; }
.play-button:hover { background: #b71c1c; transform: scale(1.05); }
.play-button:disabled { background: #666; cursor: not-allowed; }
.action-button { padding: 6px 12px; font-size: 12px; font-weight: 600; color: white; border: none; border-radius: 5px; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; }
.action-button.accept { background: #2e7d32; }
.action-button.reject { background: #b71c1c; }
.action-button:hover { opacity: 0.9; transform: scale(1.05); }

/* Estilos do Jogo */
.truco-game {
    text-align: center;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1b5e20, #2e7d32);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
}
.truco-game h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
.mode-selection {
    margin-bottom: 20px;
}
.mode-button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(90deg, #d81b60, #f06292);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 10px;
    transition: background 0.3s ease, transform 0.2s ease;
}
.mode-button:hover {
    background: linear-gradient(90deg, #b71c1c, #d81b60);
    transform: scale(1.05);
}
.game-table {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}
.round-history {
    width: 100%;
    max-height: 150px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row-reverse;
    gap: 15px;
}
.round-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: left;
    font-size: 14px;
}
.table-section {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}
.table-section h3 {
    font-size: 20px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.players-section {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 900px;
}
.player-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    width: 40%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}
.player-section:hover {
    transform: scale(1.02);
}
.player-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.cards {
    margin: 10px 0;
}
.card {
    cursor: pointer;
    padding: 12px 20px;
    background: linear-gradient(90deg, #d81b60, #f06292);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin: 5px;
    display: inline-block;
    transition: background 0.3s ease, transform 0.2s ease;
}
.card:hover {
    background: linear-gradient(90deg, #b71c1c, #d81b60);
    transform: scale(1.05);
}
.card:disabled {
    background: #666;
    cursor: not-allowed;
}
.played-card {
    padding: 12px 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin: 5px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.start-button, .truco-button, .response-button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(90deg, #d81b60, #f06292);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin: 5px;
}
.start-button:hover, .truco-button:hover, .response-button:hover {
    background: linear-gradient(90deg, #b71c1c, #d81b60);
    transform: scale(1.05);
}
.game-status {
    margin-top: 20px;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.truco-response {
    margin-top: 10px;
}
.online-players-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.online-players-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
#online-players-list {
    list-style: none;
    padding: 0;
}
#online-players-list li {
    padding: 10px;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background 0.3s ease;
}
#online-players-list li:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar { width: 200px; }
    .main-content { margin-left: 200px; padding: 20px; }
    .auth-container { padding: 20px; }
    .friend-input { width: 150px; }
    .players-section { flex-direction: column; align-items: center; }
    .player-section { width: 90%; margin-bottom: 20px; }
}

/* Prompt de Login */
.game-login-prompt {
    text-align: center;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    max-width: 400px;
    margin: 0 auto;
}
.login-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(90deg, #d81b60, #f06292);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}
.login-button:hover {
    background: linear-gradient(90deg, #b71c1c, #d81b60);
}