* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 10px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.game-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.game-header h1 {
    text-align: center;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.player-names {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1rem;
    font-weight: 500;
}

.fox-name {
    color: #e74c3c;
}

.hound-names {
    color: #3498db;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.score-display {
    display: flex;
    gap: 20px;
    font-size: 1rem;
    font-weight: bold;
}

.fox-score {
    color: #e74c3c;
}

.hound-score {
    color: #3498db;
}

.game-progress {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

/* Join Screen */
.join-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.join-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    min-width: 280px;
}

.join-form h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.join-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.join-form input:focus {
    outline: none;
    border-color: #667eea;
}

.join-form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.join-form button:hover {
    transform: translateY(-2px);
}

/* Hide header elements on setup page */
.join-screen-active .header-buttons,
.join-screen-active .player-names {
    display: none;
}

.join-screen-active .game-header h1 {
    margin-bottom: 0;
}

/* Game Board */
.game-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

/* Controls Container */
.controls-container {
    display: flex;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.fox-controls, .hound-controls {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: background-color 0.3s ease;
}

.scoring-controls {
    flex: 0.6;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fox-controls h3, .hound-controls h3, .scoring-controls h3 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.2rem;
    color: #333;
}

.fox-controls h3 {
    color: #e74c3c;
}

.hound-controls h3 {
    color: #3498db;
}

.scoring-controls h3 {
    color: #27ae60;
    font-size: 1.5rem;
}

.player-name {
    padding: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    color: #666;
    text-align: center;
    font-size: 0.8rem;
}

/* Mark Column Layout */
.mark-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.mark-spot {
    flex: 1;
    width: 100px;
    aspect-ratio: 1;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    align-self: center;
}

/* Visual Mark States */
.mark-spot.mark-slash::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 12px;
    background: #e74c3c;
    transform: rotate(-45deg);
    border-radius: 6px;
}

.mark-spot.mark-x::before,
.mark-spot.mark-x::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 12px;
    background: #e74c3c;
    border-radius: 6px;
}

.mark-spot.mark-x::before {
    transform: rotate(-45deg);
}

.mark-spot.mark-x::after {
    transform: rotate(45deg);
}

.mark-spot.mark-bullseye::before,
.mark-spot.mark-bullseye::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 12px;
    background: #e74c3c;
    border-radius: 6px;
}

.mark-spot.mark-bullseye::before {
    transform: rotate(-45deg);
}

.mark-spot.mark-bullseye::after {
    transform: rotate(45deg);
}

.mark-spot.mark-bullseye {
    border: 8px solid #e74c3c;
    border-radius: 8px;
}

/* Hound mark colors */
.hound-controls .mark-spot.mark-slash::before,
.hound-controls .mark-spot.mark-x::before,
.hound-controls .mark-spot.mark-x::after,
.hound-controls .mark-spot.mark-bullseye::before,
.hound-controls .mark-spot.mark-bullseye::after {
    background: #3498db;
}

.hound-controls .mark-spot.mark-bullseye {
    border-color: #3498db;
}

/* Scoring Column */
.scoring-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.scoring-column .score-btn {
    flex: 1;
    padding: 12px 6px;
    font-size: 2.5rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scoring-column .score-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scoring-column .score-btn:active {
    transform: translateY(-1px);
}

.scoring-column .score-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.scoring-column .score-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive font sizes for scoring buttons */
@media (orientation: landscape) {
    .scoring-column .score-btn {
        font-size: 2.0rem;
    }
}

@media (orientation: portrait) {
    .scoring-column .score-btn {
        font-size: 2.5rem;
    }
}

/* Scoring Buttons */
.scoring-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    flex: 1;
    min-height: 0;
}

.score-btn {
    padding: 12px 8px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.score-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.score-btn:active {
    transform: translateY(-1px);
}

/* Special Buttons */
.special-buttons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.special-btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 0.8rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.special-btn.wicket {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.special-btn.wide {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.special-btn.no-ball {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

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

/* Game Status */
.game-status {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
    border: 3px solid #ddd;
}

.fox-score-display, .hound-score-display {
    flex: 1;
    text-align: center;
}

.score-value {
    font-size: 4rem;
    font-weight: bold;
    color: #333;
}

.fox-score-display .score-value {
    color: #e74c3c;
}

.hound-score-display .score-value {
    color: #3498db;
}

.enter-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-left: 60px;
    padding-right: 60px;
}

.enter-btn .arrow {
    font-size: 2.5rem;
    font-weight: 900;
    position: absolute;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    padding: 0 8px;
    top: 45%;
    transform: translateY(-50%);
}

.enter-btn .arrow.left {
    left: 10px;
    transform: translateY(-50%);
}

.enter-btn .arrow.right {
    right: 10px;
    transform: translateY(-50%);
}

.enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.enter-btn:active {
    transform: translateY(-1px);
}

.reset-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.reset-btn:hover {
    transform: translateY(-2px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.modal-content h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    min-width: 80px;
}

.modal-btn.cancel {
    background: #95a5a6;
    color: white;
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

/* Game Over */
.game-over {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.game-over h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.final-scores {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.final-score {
    font-size: 1.3rem;
    font-weight: bold;
}

.final-score .team {
    color: #666;
}

.winner {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.game-over button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-over button:hover {
    transform: translateY(-2px);
}

/* Responsive Design for iPad Portrait */
@media (max-width: 1024px) and (orientation: portrait) {
    .container {
        padding: 8px;
    }
    
    .game-header h1 {
        font-size: 1.5rem;
    }
    
    .controls-container {
        flex-direction: row;
        gap: 6px;
    }
    
    .fox-controls, .hound-controls, .scoring-controls {
        min-height: 200px;
    }
    
    .scoring-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .score-btn {
        padding: 10px 6px;
        font-size: 1rem;
    }
    
    .scoring-column .score-btn {
        padding: 10px 4px;
        font-size: 1.8rem;
    }
    
    .special-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .special-btn {
        padding: 8px;
        font-size: 0.8rem;
    }
}

/* Mobile Phone Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 6px;
        max-width: 100%;
    }
    
    .game-header {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .game-header h1 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .header-buttons {
        gap: 6px;
    }
    
    .undo-btn, .reset-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .join-form {
        padding: 20px;
        min-width: 250px;
        margin: 0 10px;
    }
    
    .join-form h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .join-form input {
        padding: 10px;
        margin-bottom: 12px;
        font-size: 0.9rem;
    }
    
    .join-form button {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Mobile Portrait (phones) */
@media (max-width: 768px) and (orientation: portrait) {
    .controls-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .fox-controls, .hound-controls, .scoring-controls {
        padding: 12px;
        min-height: auto;
    }
    
    .fox-controls h3, .hound-controls h3, .scoring-controls h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .scoring-controls h3 {
        font-size: 1.2rem;
    }
    
    .mark-column {
        flex-direction: row;
        gap: 6px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .mark-spot {
        width: 60px;
        min-width: 60px;
        flex: none;
    }
    
    .scoring-column {
        flex-direction: row;
        gap: 6px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .scoring-column .score-btn {
        padding: 8px 4px;
        font-size: 1.4rem;
        min-width: 50px;
        flex: none;
    }
    
    .game-status {
        padding: 8px;
        gap: 10px;
    }
    
    .score-value {
        font-size: 2.5rem;
    }
    
    .enter-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 20px;
        margin: 0 15px;
    }
    
    .modal-content h3 {
        font-size: 1.1rem;
    }
    
    .modal-content p {
        font-size: 0.85rem;
    }
    
    .modal-buttons {
        gap: 10px;
    }
    
    .modal-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .game-over {
        padding: 20px;
        margin: 0 10px;
    }
    
    .game-over h2 {
        font-size: 1.5rem;
    }
    
    .final-scores {
        gap: 20px;
    }
    
    .final-score {
        font-size: 1.1rem;
    }
    
    .winner {
        font-size: 1.2rem;
        padding: 12px;
    }
    
    .game-over button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Mobile Landscape (phones) */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        padding: 4px;
    }
    
    .game-header {
        padding: 6px;
        margin-bottom: 4px;
    }
    
    .game-header h1 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .controls-container {
        flex-direction: row;
        gap: 4px;
    }
    
    .fox-controls, .hound-controls, .scoring-controls {
        padding: 8px;
    }
    
    .fox-controls h3, .hound-controls h3, .scoring-controls h3 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .scoring-controls h3 {
        font-size: 1rem;
    }
    
    .mark-column {
        gap: 4px;
    }
    
    .mark-spot {
        width: 50px;
        min-width: 50px;
    }
    
    .scoring-column .score-btn {
        padding: 6px 2px;
        font-size: 1.2rem;
        min-width: 40px;
    }
    
    .game-status {
        padding: 6px;
        gap: 8px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    .enter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 4px;
    }
    
    .game-header {
        padding: 6px;
    }
    
    .game-header h1 {
        font-size: 1.1rem;
    }
    
    .join-form {
        padding: 15px;
        min-width: 200px;
    }
    
    .join-form h2 {
        font-size: 1.2rem;
    }
    
    .join-form input {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .join-form button {
        padding: 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .mark-spot {
        width: 50px;
        min-width: 50px;
    }
    
    .scoring-column .score-btn {
        padding: 6px 2px;
        font-size: 1.2rem;
        min-width: 40px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    .enter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 15px;
        margin: 0 10px;
    }
    
    .modal-content h3 {
        font-size: 1rem;
    }
    
    .modal-content p {
        font-size: 0.8rem;
    }
    
    .game-over {
        padding: 15px;
    }
    
    .game-over h2 {
        font-size: 1.3rem;
    }
    
    .final-score {
        font-size: 1rem;
    }
    
    .winner {
        font-size: 1.1rem;
        padding: 10px;
    }
}

/* Extra Small Mobile Phones */
@media (max-width: 360px) {
    .game-header h1 {
        font-size: 1rem;
    }
    
    .join-form {
        padding: 12px;
        min-width: 180px;
    }
    
    .join-form h2 {
        font-size: 1.1rem;
    }
    
    .join-form input {
        padding: 6px;
        font-size: 0.8rem;
    }
    
    .join-form button {
        padding: 6px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) and (orientation: portrait) {
    .mark-spot {
        width: 45px;
        min-width: 45px;
    }
    
    .scoring-column .score-btn {
        padding: 4px 1px;
        font-size: 1rem;
        min-width: 35px;
    }
    
    .score-value {
        font-size: 1.8rem;
    }
    
    .enter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .fox-controls h3, .hound-controls h3, .scoring-controls h3 {
        font-size: 0.9rem;
    }
    
    .scoring-controls h3 {
        font-size: 1rem;
    }
}

/* Handle notched phones and safe areas */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    
    @media (max-width: 768px) {
        .container {
            padding-left: max(6px, env(safe-area-inset-left));
            padding-right: max(6px, env(safe-area-inset-right));
            padding-top: max(6px, env(safe-area-inset-top));
            padding-bottom: max(6px, env(safe-area-inset-bottom));
        }
    }
    
    @media (max-width: 480px) {
        .container {
            padding-left: max(4px, env(safe-area-inset-left));
            padding-right: max(4px, env(safe-area-inset-right));
            padding-top: max(4px, env(safe-area-inset-top));
            padding-bottom: max(4px, env(safe-area-inset-bottom));
        }
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mark-spot {
        border-width: 1px;
    }
    
    .score-btn, .special-btn, .enter-btn, .reset-btn, .undo-btn {
        border-width: 1px;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    .game-header,
    .fox-controls,
    .hound-controls,
    .scoring-controls,
    .game-status,
    .join-form,
    .modal-content,
    .game-over {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }
    
    .game-header h1,
    .fox-controls h3,
    .hound-controls h3,
    .scoring-controls h3,
    .join-form h2,
    .modal-content h3,
    .game-over h2 {
        color: #fff;
    }
    
    .mark-spot {
        background: #2a2a2a;
        border-color: #555;
    }
    
    .join-form input {
        background: #2a2a2a;
        border-color: #555;
        color: #fff;
    }
    
    .join-form input::placeholder {
        color: #aaa;
    }
    
    .player-name {
        background: #3a3a3a;
        color: #ccc;
    }
    
    /* Fix active turn highlighting in dark mode */
    .fox-controls.active-turn {
        background: rgba(231, 76, 60, 0.2);
        border: 3px solid #e74c3c;
        color: #fff;
    }
    
    .hound-controls.active-turn {
        background: rgba(52, 152, 219, 0.2);
        border: 3px solid #3498db;
        color: #fff;
    }
    
    /* Ensure inactive columns remain readable */
    .fox-controls:not(.active-turn),
    .hound-controls:not(.active-turn) {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }
    
    /* Keep team colors visible in dark mode */
    .fox-controls h3 {
        color: #ff6b6b;
    }
    
    .hound-controls h3 {
        color: #74b9ff;
    }
}

/* Landscape orientation improvements for phones */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .container {
        padding: 2px;
    }
    
    .game-header {
        padding: 4px;
        margin-bottom: 2px;
    }
    
    .game-header h1 {
        font-size: 1rem;
        margin-bottom: 2px;
    }
    
    .controls-container {
        gap: 2px;
    }
    
    .fox-controls, .hound-controls, .scoring-controls {
        padding: 4px;
    }
    
    .fox-controls h3, .hound-controls h3, .scoring-controls h3 {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .scoring-controls h3 {
        font-size: 0.9rem;
    }
    
    .mark-spot {
        width: 40px;
        min-width: 40px;
    }
    
    .scoring-column .score-btn {
        padding: 4px 1px;
        font-size: 1rem;
        min-width: 30px;
    }
    
    .game-status {
        padding: 4px;
        gap: 6px;
    }
    
    .score-value {
        font-size: 1.6rem;
    }
    
    .enter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Touch-friendly improvements */
button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* iOS recommended minimum touch target */
}

input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px; /* iOS recommended minimum touch target */
}

/* Prevent zoom on input focus for iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input[type="text"] {
        font-size: 16px;
    }
}

/* Animation for score updates */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-update {
    animation: scoreUpdate 0.3s ease-in-out;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1024px) {
    .mark-spot {
        width: 90px;
    }
}

/* Turn indicator styles */
.fox-controls.active-turn {
    background: rgba(255, 255, 255, 0.98);
    border: 3px solid #e74c3c;
}

.hound-controls.active-turn {
    background: rgba(255, 255, 255, 0.98);
    border: 3px solid #e74c3c;
}

.undo-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.undo-btn:hover {
    transform: translateY(-2px);
}

.undo-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

/* Active player highlighting */
.active-player {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 2px;
    font-weight: bold;
    color: #e74c3c;
} 