/* Baseball Position Guessing Game Styles */

/* Global Styles */
html, body {
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}
body {
    background: linear-gradient(135deg, #4a90e2 0%, #7db7f0 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100%;
}

.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 20px; /* Less space below header */
    padding-left: 6px;
    padding-right: 6px;
}

header {
    background: #415949;;
    border-radius: 8px;
    margin: 6px;
    padding: 6px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
}

.display-4 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
    font-family: inherit;
    font-weight: 900;
}

.game-info h2.h3 {
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

.game-info .lead {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

/* Baseball Diamond Container */
.baseball-diamond-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    padding: 6px;
}

.baseball-diamond {
    position: relative;
    width: 500px;
    height: 500px;
    max-width: 90vw;
    max-height: 90vw;
}

.baseball-diamond svg rect {
    stroke: #000;
    stroke-width: 1;
}

.diamond-svg {
    width: 100%;
    height: 100%;
}

/* Position Input Fields */
.position-input {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.position-label {
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

.position-field {
    width: 140px !important;
    font-size: 0.8rem !important;
    padding: 6px !important;
    border: 2px solid #ccc !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;         /* Ensure padding/border included in width */
    overflow-x: auto !important;               /* Allow horizontal scroll if needed */
    white-space: nowrap !important;
}

.position-field:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
    outline: none;
}

.position-field.correct {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.position-field.incorrect {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Position Placements */
.catcher-pos {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.first-base-pos {
    right: 15px;
    bottom: 40%;
    transform: translateY(50%);
}

.second-base-pos {
    position: absolute;
    left: 60%;
    top: 24%;
}

.third-base-pos {
    left: 15px;
    bottom: 40%;
    transform: translateY(50%);
}

.shortstop-pos {
    position: absolute;
    left: 16%;
    top: 24%;
}

.left-field-pos {
    left: 10px;
    top: 5%;
}

.center-field-pos {
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.right-field-pos {
    right: 10px;
    top: 5%;
}

.dh-pos {
    bottom: 10px;
    right: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .baseball-diamond {
        width: 400px;
        height: 400px;
    }
    
    .position-field {
        width: 110px;
        font-size: 0.75rem;
        padding: 4px;
    }
    
    .position-label {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
}

@media (max-width: 576px) {
    .baseball-diamond {
        width: 320px;
        height: 320px;
    }

    .position-field {
        width: 90px;
        font-size: 0.7rem;
        padding: 3px;
    }

    .position-label {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .dh-pos {
        right: 10px;
        left: auto;
    }
}

/* Results Section */
#resultsSection {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    font-weight: normal;
.score-summary .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.score-summary .card:hover {
    transform: translateY(-5px);
}

.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: #2c3e50 !important;
    border: none;
    color: white;
    font-weight: 600;
    padding: 15px;
}

.table tbody td {
    padding: 12px 15px;
    border-color: #e9ecef;
    vertical-align: middle;
}

.result-correct {
    color: #28a745 !important;
    font-weight: bold;
}

.result-incorrect {
    color: #dc3545 !important;
    font-weight: bold;
}

.result-no-guess {
    color: #6c757d;
    font-style: italic;
}

/* Buttons */
.btn-primary {
    background: #dc3545;
    border: none;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: #a71d2a;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    transform: none;
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #545b62);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    background: linear-gradient(45deg, #545b62, #464c52);
}

/* Loading Spinner */
.spinner-border {
    color: #4a90e2;
}

/* Accessibility Improvements */
.position-field:focus {
    outline: 3px solid rgba(74, 144, 226, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .position-label {
        background: white;
        border: 2px solid black;
    }
    
    .position-field {
        border: 3px solid black;
        background: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .position-field,
    .btn-primary,
    .btn-secondary,
    .score-summary .card {
        transition: none;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .baseball-diamond-container {
        page-break-inside: avoid;
    }
    
    #resultsSection {
        background: white;
        box-shadow: none;
        border: 2px solid black;
    }
}
}