body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2c3e50;
    color: white;
    text-align: center;
    margin: 0;
    padding: 10px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

.mascot-gorilla {
    font-size: 50px;
    position: absolute;
    left: -20px;
    top: -10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: gorillaBounce 2s infinite ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

@keyframes gorillaBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
}

.table {
    background-color: #27ae60;
    border: 8px solid #8e44ad;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    position: relative;
    box-sizing: border-box;
    margin: 10px auto;
}

.hand {
    height: 130px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.play-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 20px 0;
    position: relative;
    min-height: 200px;
}

#trick-area {
    display: flex;
    gap: 20px;
}

.card-container {
    width: 70px;
    height: 120px;
    margin: 0 5px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.tennis-card {
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: 2px solid #333;
    transition: transform 0.2s;
    color: #333;
}

.table-card {
    border: 4px solid #f1c40f !important;
    width: 120px !important;
    height: 180px !important;
}

.is-match {
    box-shadow: 0 0 15px #2ecc71;
    border-color: #2ecc71;
}

.is-miss {
    box-shadow: 0 0 15px #e74c3c;
    border-color: #e74c3c;
}

.symbols {
    display: flex;
    gap: 10px;
}

.action-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.action-btn {
    width: 80px;
    height: 120px;
    background: #f1c40f;
    border: 3px solid #d4ac0d;
    border-radius: 10px;
    font-size: 40px;
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    box-shadow: 0 6px #b7950b;
    transition: transform 0.1s;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-5px);
}

.action-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.log-panel {
    width: 90%;
    max-width: 800px;
    background: #34495e;
    border-radius: 10px;
    margin: 10px auto;
    padding: 10px;
    text-align: left;
    height: 150px;
    display: flex;
    flex-direction: column;
}

#log-content {
    flex: 1;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
    color: #ecf0f1;
}

.fatigue-active-banner {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 3px solid #f1c40f;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fatiguePulse 1.5s infinite alternate ease-in-out;
}

.fatigue-preview-banner {
    background: #34495e;
    border: 2px dashed #95a5a6;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    opacity: 0.9;
}

.fatigue-preview-banner .fatigue-title {
    color: #ecf0f1;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 2px;
}

.fatigue-preview-banner .fatigue-desc {
    color: #95a5a6;
    font-size: 12px;
    font-weight: bold;
}

.fatigue-title { font-weight: 900; color: #fff; }
.fatigue-desc { font-weight: bold; color: #ffd700; font-size: 13px; }

@keyframes fatiguePulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.deck-info {
    font-weight: bold;
    background: rgba(0,0,0,0.3);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.deck-info-bottom { margin-top: 10px; font-weight: bold; color: #bdc3c7; }

#score-board { font-size: 18px; font-weight: bold; margin-top: 10px; }

/* Screen Shake Effects */
@keyframes shake-low {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-5px, 0); }
    50% { transform: translate(5px, 0); }
    75% { transform: translate(-5px, 0); }
    100% { transform: translate(0, 0); }
}

@keyframes shake-medium {
    0% { transform: translate(0, 0); }
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes shake-high {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-10px, -10px) rotate(-5deg); }
    20% { transform: translate(10px, 10px) rotate(5deg); }
    30% { transform: translate(-10px, 10px) rotate(-5deg); }
    40% { transform: translate(10px, -10px) rotate(5deg); }
    50% { transform: translate(-10px, -10px) rotate(-5deg); }
    60% { transform: translate(10px, 10px) rotate(5deg); }
    70% { transform: translate(-10px, 10px) rotate(-5deg); }
    80% { transform: translate(10px, -10px) rotate(5deg); }
    90% { transform: translate(0, 0) rotate(0); }
    100% { transform: translate(0, 0) rotate(0); }
}

.shake-effect-low {
    animation: shake-low 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.shake-effect-medium {
    animation: shake-medium 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

.shake-effect-high {
    animation: shake-high 0.8s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #e74c3c !important;
    box-shadow: 0 0 20px #e74c3c;
}
