/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-title-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: left;
}

.game-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

h1 {
    text-align: center;
    color: white;
    margin: 0;
}

h1 .version {
    font-size: 0.6em;
    font-weight: normal;
    opacity: 0.8;
    margin-left: 10px;
    margin: 0;
    flex: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.top-right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.icon-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

.checkbox-label:hover {
    background: white;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Game controls */
.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

#newGameBtn, #undoBtn {
    padding: 12px 24px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#newGameBtn:hover {
    background: #45a049;
}

#undoBtn {
    background: #2196F3;
}

#undoBtn:hover:not(:disabled) {
    background: #1976D2;
}

#undoBtn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.status {
    padding: 12px 24px;
    background: white;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Game info */
.game-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.possession-indicator {
    display: flex;
    justify-content: space-around;
    font-size: 18px;
    flex: 1;
}

.possession-indicator strong {
    color: #667eea;
}

.fatigue-counter {
    color: #d32f2f;
}

.fatigue-counter strong {
    color: #d32f2f;
}

.stopwatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    min-width: 100px;
}

.stopwatch-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stopwatch {
    font-size: 32px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #333;
    text-align: center;
    line-height: 1;
}

.stopwatch.warning {
    color: #d32f2f;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Game board */
.game-board {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.game-board .player-panel {
    flex: 0 0 400px;
    min-width: 0;
}

.game-board .common-field-area {
    flex: 1;
    min-width: 0;
}

/* Player panels */
.player-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.player-1 {
    border-left: 5px solid #2196F3;
}

.player-2 {
    border-right: 5px solid #f44336;
}

.player-panel.current-player {
    border: 10px solid #000000;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.player-panel {
    position: relative;
}

.waiting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(128, 128, 128, 0.7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.waiting-overlay.hidden {
    display: none;
}

.waiting-message {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.player-header h2 {
    color: #333;
    font-size: 24px;
}

.player-stats {
    display: flex;
    gap: 15px;
}

.goals {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
}

.action-buttons-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.shoot-btn, .switch-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shoot-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.shoot-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6);
    background: linear-gradient(135deg, #ff5252 0%, #f44336 100%);
}

.switch-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.switch-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.6);
    background: linear-gradient(135deg, #42A5F5 0%, #2196F3 100%);
}

.shoot-btn:active:not(:disabled),
.switch-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.shoot-btn:disabled,
.switch-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #ccc;
    box-shadow: none;
}

.shoot-btn.hidden,
.switch-btn.hidden {
    display: none;
}

.build-up-counter {
    font-size: 16px;
    color: #FF9800;
    font-weight: bold;
}

/* Team card */
.team-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.team-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.team-ability {
    font-size: 14px;
    opacity: 0.9;
}

/* Common field area */
.common-field-area {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 400px;
}

.field-section-top {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-top: 0;
}

.field-section-bottom {
    padding-top: 20px;
    margin-top: 0;
}

/* Field and hand sections */
.field-section, .hand-section, .bench-section {
    margin-top: 20px;
}

.bench-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bench-header h3 {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.bench {
    display: flex;
    gap: 10px;
    min-height: 100px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    flex-wrap: wrap;
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.field-header h3 {
    margin: 0;
}

.discard-pile-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: #757575;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.discard-pile-btn:hover {
    background: #616161;
}

.field-section h3, .hand-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #666;
}

.hand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hand-header h3 {
    margin: 0;
}

.deck-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.deck-btn:hover {
    background: #45a049;
}

.field {
    display: flex;
    gap: 10px;
    min-height: 120px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    flex-wrap: wrap;
}

.hand {
    display: flex;
    gap: 10px;
    min-height: 140px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    flex-wrap: wrap;
}

/* Cards */
.card {
    width: 100px;
    height: 130px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.card.exhausted {
    opacity: 0.5;
    filter: grayscale(50%);
}

.card.exhausted::after {
    content: 'EXHAUSTED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 10px;
    font-weight: bold;
    color: #f44336;
    background: rgba(255,255,255,0.9);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Card location badge */
.card-location-badge {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-location-badge.location-hand {
    background: #4CAF50;
    color: white;
}

.card-location-badge.location-field {
    background: #FF9800;
    color: white;
}

.card-owner-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(33, 150, 243, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-random-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Mulligan card selection */
.mulligan-card.selected {
    border: 3px solid #4CAF50;
    background: #e8f5e9;
}

/* When action or event cards are selected in mulligan, change text to black for readability */
.mulligan-card.selected.card-action,
.mulligan-card.selected.card-action .card-name {
    color: #333;
}

.mulligan-card.selected.card-event,
.mulligan-card.selected.card-event .card-name {
    color: #333;
}

.mulligan-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #4CAF50;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.card.selected {
    border: 3px solid #4caf50;
    background: rgba(76, 175, 80, 0.2);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
}

.play-btn {
    width: 100%;
    padding: 12px 24px;
    margin-top: 10px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.play-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #4caf50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.play-btn:active:not(:disabled) {
    transform: translateY(0);
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

/* Player card styles */
.card-player {
    border-top: 4px solid;
}

.card-player.role-striker {
    border-top-color: #f44336;
}

.card-player.role-midfielder {
    border-top-color: #FFC107;
}

.card-player.role-defender {
    border-top-color: #2196F3;
}

.card-player.role-goalkeeper {
    border-top-color: #4CAF50;
}

.card-name {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 5px;
    text-align: center;
}

.card-role {
    font-size: 10px;
    text-transform: uppercase;
    color: #666;
    text-align: center;
    margin-bottom: 5px;
}

.card-strength {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #333;
}

.card-stats {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin-top: 5px;
}

.stat-modifier {
    font-size: 12px;
    font-weight: bold;
    margin-left: 2px;
}

.stat-modifier.bonus {
    color: #4CAF50; /* Green for bonuses */
}

.stat-modifier.malus {
    color: #f44336; /* Red for maluses */
}

/* Action card styles */
.card-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top: 4px solid #5a67d8;
}

.card-action .card-name {
    color: white;
}

.card-action .card-type {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.8;
    text-align: center;
}

/* Event card styles */
.card-event {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-top: 4px solid #e91e63;
}

.card-event .card-name {
    color: white;
}

.card-event .card-type {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.8;
    text-align: center;
}

.card-info-icon {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-info-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Action panel */
.action-panel, .reaction-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.player-action-panel {
    margin-top: 15px;
    margin-bottom: 0;
    padding: 15px;
    background: #f9f9f9;
    border-top: 2px solid #eee;
}

.player-action-panel.hidden, .player-reaction-panel.hidden {
    display: none;
}

.action-panel h3, .reaction-panel h3 {
    margin-bottom: 15px;
    color: #333;
}

.player-action-panel, .player-reaction-panel {
    margin-top: 15px;
    margin-bottom: 0;
    padding: 15px;
    background: #f9f9f9;
    border-top: 2px solid #eee;
}

.player-action-panel h3, .player-reaction-panel h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.player-action-panel .action-buttons button, .player-reaction-panel .reaction-buttons button {
    font-size: 13px;
    padding: 10px 16px;
}

.action-buttons, .reaction-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-buttons button, .reaction-buttons button {
    padding: 12px 20px;
    font-size: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.action-buttons button:hover, .reaction-buttons button:hover {
    background: #5568d3;
}

/* Modals */
.hidden {
    display: none !important;
}

.selection-modal, .team-selection-modal, .calculation-modal, .card-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.card-zoom-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-cards .card.selected {
    border: 3px solid #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-3px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666 !important;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.modal-cards .card.required {
    border: 3px solid #ff9800;
    background: #fff3e0;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.modal-cards .card.required::before {
    content: 'REQUIRED';
    position: absolute;
    top: 2px;
    left: 2px;
    background: #ff9800;
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
    z-index: 1;
}

/* Disabled button styles */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #ccc !important;
    color: #666 !important;
    border-color: #999 !important;
}

button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #ccc !important;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.deck-option-btn {
    padding: 12px 24px;
    font-size: 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.deck-option-btn:hover {
    background: #5568d3;
}

.modal-actions button {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

#modalCancel {
    background: #ccc;
    color: #333;
}

#modalCancel:hover {
    background: #bbb;
}

#calcClose {
    background: #667eea;
    color: white;
}

#calcClose:hover {
    background: #5568d3;
}

/* Team selection */
.team-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.team-card-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-card-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.team-card-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.team-card-ability {
    font-size: 12px;
    opacity: 0.9;
}

/* Shoot Result Modal */
.shoot-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shoot-result-content {
    text-align: center;
    padding: 60px 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.4s ease-out;
    max-width: 600px;
}

@keyframes scaleIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.shoot-result-text {
    font-size: 72px;
    font-weight: 900;
    color: white;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    letter-spacing: 4px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.shoot-result-text.goal {
    color: #4caf50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.shoot-result-text.miss {
    color: #f44336;
    text-shadow: 0 0 20px rgba(244, 67, 54, 0.8), 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.shoot-result-details {
    font-size: 24px;
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.shoot-result-button {
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.shoot-result-button:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.shoot-result-button:active {
    transform: translateY(0);
}

/* Calculation modal */
#calculationDetails {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* Game log */
.game-log {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
}

.game-log h3 {
    margin-bottom: 15px;
    color: #333;
}

#logContent {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.log-entry {
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    border-left: 3px solid #667eea;
}

/* Responsive design */
@media (max-width: 1200px) {
    /* Layout already single column */
}

@media (max-width: 768px) {
    .header-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .top-right-controls {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        text-align: center;
    }
    
    .shoot-btn,
    .switch-btn {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .action-buttons-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .card {
        width: 80px;
        height: 110px;
    }
    
    .card-name {
        font-size: 10px;
    }
    
    .card-strength {
        font-size: 20px;
    }
    
    .player-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-stats {
        margin-top: 10px;
    }
    
    .shoot-btn,
    .switch-btn {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .action-buttons-header {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Mobile game board layout: vertical stack */
    .game-board {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Reorder for mobile: Player 2 → Field → Player 1 */
    .game-board .player-2 {
        order: 1;
    }
    
    .game-board .common-field-area {
        order: 2;
        flex: 1 1 auto;
        width: 100%;
    }
    
    .game-board .player-1 {
        order: 3;
    }
    
    .game-board .player-panel {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }
    
    .possession-indicator {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stopwatch-container {
        align-self: center;
    }
    
    /* Field sections already stack vertically, just ensure spacing */
    .common-field-area {
        gap: 15px;
    }
}

