/* ===========================
   Casino Theme Styles
   =========================== */

/* Playing Card Styles */
.playing-card {
    width: 100px;
    height: 140px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #333; /* Default text color */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: inline-block;
    margin: 5px;
    position: relative;
    user-select: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.playing-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.playing-card.face-down {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid white;
}

.playing-card .card-back {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 0px,
        rgba(255, 255, 255, 0.1) 10px,
        transparent 10px,
        transparent 20px
    );
}

.playing-card .card-pattern {
    font-size: 48px;
    opacity: 0.8;
}

.playing-card .card-content {
    width: 100%;
    height: 100%;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Explicit colors for suits to fix visibility issues */
.playing-card[data-suit="hearts"] .rank,
.playing-card[data-suit="hearts"] .suit,
.playing-card[data-suit="diamonds"] .rank,
.playing-card[data-suit="diamonds"] .suit,
.playing-card[data-suit="hearts"] .suit-large,
.playing-card[data-suit="diamonds"] .suit-large {
    color: #d32f2f; /* Red */
}

.playing-card[data-suit="clubs"] .rank,
.playing-card[data-suit="clubs"] .suit,
.playing-card[data-suit="spades"] .rank,
.playing-card[data-suit="spades"] .suit,
.playing-card[data-suit="clubs"] .suit-large,
.playing-card[data-suit="spades"] .suit-large {
    color: #212121; /* Black */
}

.card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.card-corner.top-left {
    top: 5px;
    left: 5px;
}

.card-corner.bottom-right {
    bottom: 5px;
    right: 5px;
    transform: rotate(180deg);
}

.rank {
    font-size: 18px;
    font-weight: 900;
    font-family: 'Roboto', sans-serif;
    letter-spacing: -1px;
}

.suit {
    font-size: 16px;
    margin-top: 2px;
}

.card-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.suit-large {
    font-size: 56px;
    opacity: 1;
}

/* Blackjack Game Container */
.blackjack-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.blackjack-container h1 {
    text-align: center;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.game-info {
    text-align: center;
    margin-bottom: 20px;
}

/* Betting Phase */
.betting-phase {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.betting-phase h2 {
    color: #ffd700;
    margin-bottom: 20px;
}

/* Bet Controls */
.bet-controls {
    margin: 20px 0;
}

.bet-input-group {
    margin-bottom: 15px;
}

.bet-input-group label {
    display: block;
    margin-bottom: 5px;
    color: white;
    font-weight: bold;
}

.bet-input {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    text-align: center;
    font-size: 18px;
    padding: 10px;
}

.preset-bets {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-bet {
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-bet:hover:not(:disabled) {
    background: linear-gradient(145deg, #ffed4e, #ffd700);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.btn-bet:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-all-in {
    background: linear-gradient(145deg, #ff6b6b, #ee5a6f);
    color: white;
}

.btn-all-in:hover:not(:disabled) {
    background: linear-gradient(145deg, #ee5a6f, #ff6b6b);
}

.bet-error {
    margin-top: 10px;
}

/* Game Table */
.game-table {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dealer-section, .player-section {
    margin-bottom: 30px;
    text-align: center;
}

.dealer-section h3, .player-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.hand {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 160px;
    align-items: center;
}

.hand-small .playing-card {
    width: 70px;
    height: 98px;
}

.hand-hint {
    color: #fff;
    margin-top: 10px;
    font-style: italic;
}

.bust-message {
    color: #ff4444;
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
    animation: shake 0.5s;
}

.blackjack-message {
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
    animation: pulse 1s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Game Actions */
.game-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn-action {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-action:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dealer-turn-message {
    text-align: center;
    color: #ffd700;
    font-size: 20px;
    margin-top: 20px;
    animation: pulse 1.5s infinite;
}

/* Game Result Modal */
.game-result {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-modal {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.result-modal h2 {
    color: #ffd700;
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.result-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-details p {
    color: white;
    font-size: 18px;
    margin: 10px 0;
}

.result-win {
    color: #4caf50;
    font-size: 22px;
}

.result-loss {
    color: #f44336;
    font-size: 22px;
}

.result-push {
    color: #ff9800;
    font-size: 22px;
}

.payout {
    color: #4caf50;
    font-size: 24px;
    font-weight: bold;
}

.payout-push {
    color: #ff9800;
    font-size: 20px;
}

.payout-loss {
    color: #f44336;
    font-size: 20px;
}

.final-hands {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.final-hand {
    flex: 1;
    max-width: 250px;
}

.final-hand h4 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
}

/* Balance Display */
.balance-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.balance-icon {
    font-size: 24px;
}

.balance-amount {
    color: #ffd700;
}

/* Lobby Styles */
.lobby-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lobby-header {
    text-align: center;
    margin-bottom: 30px;
}

.lobby-header h1 {
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.quick-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #ffd700;
}

.stat-label {
    color: white;
    margin-top: 5px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.game-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.game-card h2 {
    color: #ffd700;
    margin-bottom: 15px;
}

.game-card p {
    color: white;
    margin-bottom: 20px;
}

.game-stats {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.game-stats span {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: white;
}

.btn-play {
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 8px;
    width: 100%;
}

.btn-play:hover {
    background: linear-gradient(145deg, #ffed4e, #ffd700);
}

.lobby-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Account Page */
.account-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.account-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.account-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row .label {
    color: #aaa;
}

.info-row .value {
    color: white;
    font-weight: bold;
}

.balance-row .balance-value {
    color: #ffd700;
    font-size: 24px;
}

.balance-actions {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.transactions-table {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.transactions-table th {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 12px;
    text-align: left;
}

/* ===========================
   MudBlazor Custom Enhancements
   =========================== */

/* Game Card Hover Effect */
.game-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card-hover:hover {
    transform: translateY(-8px);
    cursor: pointer;
}
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #4caf50;
    color: white;
}

.badge-warning {
    background: #ff9800;
    color: white;
}

.badge-danger {
    background: #f44336;
    color: white;
}

.amount-positive {
    color: #4caf50;
}

.amount-negative {
    color: #f44336;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.casino-title {
    text-align: center;
    color: #ffd700;
    font-size: 42px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.casino-subtitle {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.info-box h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.info-box ul {
    color: white;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .playing-card {
        width: 70px;
        height: 98px;
    }
    
    .card-center .suit-large {
        font-size: 32px;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    .final-hands {
        flex-direction: column;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
}
