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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

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

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.header-image {
    flex-shrink: 0;
}

.header-image img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.round-display {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.parks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    height: calc(100vh - 200px);
}

.park-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.park-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.park-header {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
    position: relative;
}

.park-header h2 {
    color: #2c3e50;
    font-size: 1.4em;
    margin: 0;
}

.winner-stars {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.star {
    font-size: 1.5em;
    opacity: 0;
    transition: all 0.3s ease;
    color: #bdc3c7;
}

.star.winner {
    opacity: 1;
    color: #f1c40f;
    text-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
    transform: scale(1.1);
}

.park-layout {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.player-side {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.light-side {
    background-color: #f8f9fa;
}

.dark-side {
    background-color: #e9ecef;
}

/* Green Park Colors */
#green-table .light-side {
    background: linear-gradient(135deg, #d5f4e6, #c8e6c9);
    border-left: 3px solid #4caf50;
}

#green-table .dark-side {
    background: linear-gradient(135deg, #2d5016, #1b2f0e);
    color: #e8f5e8;
    border-right: 3px solid #2e7d32;
}

/* Purple Park Colors */
#purple-table .light-side {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-left: 3px solid #9c27b0;
}

#purple-table .dark-side {
    background: linear-gradient(135deg, #4a148c, #2d0845);
    color: #f3e5f5;
    border-right: 3px solid #6a1b9a;
}

/* Red Park Colors */
#red-table .light-side {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-left: 3px solid #f44336;
}

#red-table .dark-side {
    background: linear-gradient(135deg, #b71c1c, #7f0000);
    color: #ffebee;
    border-right: 3px solid #c62828;
}

/* Tan Park Colors */
#tan-table .light-side {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-left: 3px solid #ff9800;
}

#tan-table .dark-side {
    background: linear-gradient(135deg, #5d4037, #3e2723);
    color: #fff8e1;
    border-right: 3px solid #795548;
}

.park-image {
    flex: 0 0 auto;
    text-align: center;
    align-self: center;
}

.park-image img {
    max-width: 120px;
    max-height: 90px;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.side-label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    text-align: center;
    color: #2c3e50;
    flex-shrink: 0;
}

.player-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
}

.player-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background-color: white;
    border-radius: 4px;
    min-height: 28px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    font-size: 0.85em;
}

.park-symbol {
    font-size: 1.2em;
    font-weight: bold;
    min-width: 18px;
    flex-shrink: 0;
    text-align: center;
}

/* Symbol colors for each park */
.green-symbol.light-variant {
    color: #2e7d32;
}

.green-symbol.dark-variant {
    color: #1b5e20;
}

.red-symbol.light-variant {
    color: #d32f2f;
}

.red-symbol.dark-variant {
    color: #b71c1c;
}

.purple-symbol.light-variant {
    color: #7b1fa2;
}

.purple-symbol.dark-variant {
    color: #4a148c;
}

.tan-symbol.light-variant {
    color: #f57c00;
}

.tan-symbol.dark-variant {
    color: #bf360c;
}

.player-number {
    color: #7f8c8d;
    font-weight: bold;
    min-width: 20px;
    flex-shrink: 0;
}

.player-name {
    flex: 1;
}

.player-slot:hover {
    border-color: #3498db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.player-name {
    font-size: 1.1em;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.controls {
    text-align: center;
    margin-top: 15px;
    flex-shrink: 0;
}

.control-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px;
}

.control-btn:hover {
    background-color: #2980b9;
}

/* Registration page styles */
.register-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.shape-display {
    width: 100px;
    height: 100px;
    margin: 30px auto;
}

#register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#player-name {
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.side-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.side-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background-color: white;
    color: #3498db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.side-btn:hover, .side-btn.selected {
    background-color: #3498db;
    color: white;
}

#submit-btn {
    padding: 12px 24px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
}

#submit-btn:hover {
    background-color: #27ae60;
}

.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.result-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qr-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.qr-item h3 {
    margin-bottom: 10px;
}

/* Shape displays for registration page */
.shape-display .circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #3498db;
}

.shape-display .double-diamond {
    position: relative;
    width: 100px;
    height: 50px;
}

.shape-display .double-diamond::before,
.shape-display .double-diamond::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #e74c3c;
    transform: rotate(45deg);
}

.shape-display .double-diamond::before {
    left: 0;
}

.shape-display .double-diamond::after {
    right: 0;
}

/* Responsive design */
@media (max-width: 1200px) {
    .parks-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        height: auto;
    }
}

@media (max-width: 768px) {
    .park-layout {
        flex-direction: column;
        gap: 10px;
    }
    
    .park-image img {
        max-width: 100px;
        max-height: 60px;
    }
    
    .control-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .parks-grid {
        height: auto;
    }
}

/* Dark side styling */
.dark-side .side-label {
    color: white !important;
}

.dark-side .player-slot {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #2c3e50 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.dark-side .player-number {
    color: #34495e !important;
}

.dark-side .player-name {
    color: #2c3e50 !important;
}
