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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

.header-left h1 {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.header-left .current-player {
    font-size: 1.1em;
    font-weight: bold;
    color: white;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s;
}

.github-link:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.github-link svg {
    flex-shrink: 0;
}

.game-controls {
    text-align: center;
}

header h1 {
    color: white;
    text-align: center;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.current-player {
    font-size: 1.2em;
    font-weight: bold;
}

#currentPlayerName {
    color: #ffeb3b;
}

.btn-primary {
    background: #ff5722;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary.btn-large {
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 8px;
}

.game-setup-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.game-setup-form h3 {
    color: #1b5e20;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #00c853;
    border-radius: 6px;
    font-size: 1em;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00e676;
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

.player-names {
    display: none;
}

.player-names.active {
    display: block;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

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

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

.main-game {
    display: flex;
    gap: 20px;
}

.board-container {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.game-board {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 80px repeat(9, 1fr) 80px;
    grid-template-rows: 80px repeat(9, 1fr) 80px;
    gap: 0;
    background: #e8f5e9;
    border: 3px solid #2e7d32;
    position: relative;
}

.space {
    border: 2px solid #388e3c;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4px;
    font-size: 0.7em;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.space:hover {
    background: #f5f5f5;
    transform: scale(1.02);
    z-index: 10;
}

.space.landing {
    animation: landingPulse 1s ease-in-out;
    z-index: 15;
}

@keyframes landingPulse {
    0%, 100% {
        background: #fff;
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
    }
    25% {
        background: #c8e6c9;
        box-shadow: 0 0 0 10px rgba(0, 200, 83, 0);
    }
    50% {
        background: #a5d6a7;
        box-shadow: 0 0 0 10px rgba(0, 200, 83, 0);
    }
    75% {
        background: #c8e6c9;
        box-shadow: 0 0 0 10px rgba(0, 200, 83, 0);
    }
}

/* Corner spaces */
.corner {
    grid-column: span 1;
    grid-row: span 1;
    background: linear-gradient(135deg, #1b5e20, #388e3c);
    color: white;
    font-weight: bold;
    font-size: 0.8em;
}

.corner.top-right {
    grid-column: 11;
    grid-row: 1;
}

.corner.top-left {
    grid-column: 1;
    grid-row: 1;
}

.corner.bottom-left {
    grid-column: 1;
    grid-row: 11;
}

.corner.bottom-right {
    grid-column: 11;
    grid-row: 11;
}

.corner-title {
    font-size: 1.2em;
    margin-bottom: 4px;
}

.corner-subtitle {
    font-size: 0.8em;
}

/* Top row */
.space[data-position="1"] { grid-column: 10; grid-row: 1; }
.space[data-position="2"] { grid-column: 9; grid-row: 1; }
.space[data-position="3"] { grid-column: 8; grid-row: 1; }
.space[data-position="4"] { grid-column: 7; grid-row: 1; }
.space[data-position="5"] { grid-column: 6; grid-row: 1; }
.space[data-position="6"] { grid-column: 5; grid-row: 1; }
.space[data-position="7"] { grid-column: 4; grid-row: 1; }
.space[data-position="8"] { grid-column: 3; grid-row: 1; }
.space[data-position="9"] { grid-column: 2; grid-row: 1; }

/* Left column */
.space[data-position="11"] { grid-column: 1; grid-row: 2; }
.space[data-position="12"] { grid-column: 1; grid-row: 3; }
.space[data-position="13"] { grid-column: 1; grid-row: 4; }
.space[data-position="14"] { grid-column: 1; grid-row: 5; }
.space[data-position="15"] { grid-column: 1; grid-row: 6; }
.space[data-position="16"] { grid-column: 1; grid-row: 7; }
.space[data-position="17"] { grid-column: 1; grid-row: 8; }
.space[data-position="18"] { grid-column: 1; grid-row: 9; }
.space[data-position="19"] { grid-column: 1; grid-row: 10; }

/* Bottom row */
.space[data-position="21"] { grid-column: 2; grid-row: 11; }
.space[data-position="22"] { grid-column: 3; grid-row: 11; }
.space[data-position="23"] { grid-column: 4; grid-row: 11; }
.space[data-position="24"] { grid-column: 5; grid-row: 11; }
.space[data-position="25"] { grid-column: 6; grid-row: 11; }
.space[data-position="26"] { grid-column: 7; grid-row: 11; }
.space[data-position="27"] { grid-column: 8; grid-row: 11; }
.space[data-position="28"] { grid-column: 9; grid-row: 11; }
.space[data-position="29"] { grid-column: 10; grid-row: 11; }

/* Right column */
.space[data-position="31"] { grid-column: 11; grid-row: 10; }
.space[data-position="32"] { grid-column: 11; grid-row: 9; }
.space[data-position="33"] { grid-column: 11; grid-row: 8; }
.space[data-position="34"] { grid-column: 11; grid-row: 7; }
.space[data-position="35"] { grid-column: 11; grid-row: 6; }
.space[data-position="36"] { grid-column: 11; grid-row: 5; }
.space[data-position="37"] { grid-column: 11; grid-row: 4; }
.space[data-position="38"] { grid-column: 11; grid-row: 3; }
.space[data-position="39"] { grid-column: 11; grid-row: 2; }

/* Color bars for properties */
.color-bar {
    width: 100%;
    height: 15px;
    margin-bottom: 4px;
}

.color-bar.red { background: #f44336; }
.color-bar.lightblue { background: #03a9f4; }
.color-bar.pink { background: #e91e63; }
.color-bar.orange { background: #ff9800; }
.color-bar.yellow { background: #ffeb3b; }
.color-bar.green { background: #4caf50; }
.color-bar.darkblue { background: #2196f3; }
.color-bar.purple { background: #9c27b0; }

.space-name {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.space-price {
    font-size: 0.8em;
    color: #666;
}

.property.owned {
    background: #fff9c4;
}

.property.owned-by-1 {
    border: 3px solid #ff5722;
}

.property.owned-by-2 {
    border: 3px solid #2196f3;
}

.property.owned-by-3 {
    border: 3px solid #4caf50;
}

.property.owned-by-4 {
    border: 3px solid #9c27b0;
}

/* Center board */
.center-board {
    grid-column: 2 / 11;
    grid-row: 2 / 11;
    background: linear-gradient(135deg, #ffffff, #e8f5e9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: 2px solid #388e3c;
}

.center-board h2 {
    color: #1b5e20;
    font-size: 2em;
    text-align: center;
    margin-bottom: 20px;
}

.dice-display {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.die {
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid #1b5e20;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    color: #1b5e20;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-roll {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-roll:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-roll:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.game-message {
    margin-top: 20px;
    padding: 15px;
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    min-height: 50px;
    max-width: 400px;
}

.club-fact-box {
    margin: 15px auto;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    border: 3px solid #0d47a1;
    border-radius: 12px;
    padding: 15px 25px;
    max-width: 450px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    animation: factSlideIn 0.5s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.club-fact-box .fact-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.club-fact-box .fact-text {
    color: white;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes factSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Player tokens */
.player-token {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    position: absolute;
    top: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.4s ease-out;
}

.player-token.moving {
    animation: tokenMove 0.6s ease-in-out;
    transform: scale(1.3);
}

@keyframes tokenMove {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.5) translateY(-10px); }
}

.player-token-1 { background: #ff5722; left: 3px; }
.player-token-2 { background: #2196f3; left: 25px; }
.player-token-3 { background: #4caf50; left: 47px; }
.player-token-4 { background: #9c27b0; left: 69px; }

/* Sidebar */
.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar > div {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.sidebar h3 {
    color: #1b5e20;
    margin-bottom: 12px;
    border-bottom: 2px solid #00c853;
    padding-bottom: 8px;
}

.player-card {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 3px solid transparent;
}

.player-card.active {
    border-color: #00c853;
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.5);
}

.player-card.player-1 { border-left: 5px solid #ff5722; }
.player-card.player-2 { border-left: 5px solid #2196f3; }
.player-card.player-3 { border-left: 5px solid #4caf50; }
.player-card.player-4 { border-left: 5px solid #9c27b0; }

.player-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 6px;
}

.player-money {
    color: #1b5e20;
    font-weight: bold;
    font-size: 1.1em;
}

.player-properties {
    margin-top: 6px;
    font-size: 0.9em;
    color: #666;
}

.btn-action {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: #00c853;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-action:hover:not(:disabled) {
    background: #00e676;
    transform: translateY(-2px);
}

.btn-action:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.property-info {
    max-height: 250px;
    overflow-y: auto;
}

#propertyDetails {
    font-size: 0.95em;
    line-height: 1.6;
}

.rules-panel ul {
    list-style-position: inside;
    font-size: 0.9em;
    line-height: 1.8;
}

.rules-panel li {
    margin-bottom: 6px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#modalTitle {
    color: #1b5e20;
    margin-bottom: 15px;
}

#modalMessage {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.6;
}

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

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn.primary {
    background: #00c853;
    color: white;
}

.modal-btn.secondary {
    background: #ff5722;
    color: white;
}

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

/* Development indicators */
.development-indicators {
    display: flex;
    gap: 3px;
    justify-content: center;
    align-items: center;
    margin-top: 2px;
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px;
    border-radius: 3px;
}

.dev-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4caf50;
    border: 2px solid #2e7d32;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
}

.dev-indicator::after {
    content: '⚽';
    font-size: 10px;
}

.dev-indicator.star {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 2px solid #ff9800;
    width: 18px;
    height: 18px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
    animation: starPulse 2s infinite;
}

.dev-indicator.star::after {
    content: '⭐';
    font-size: 12px;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.9);
    }
}

.dev-indicator.new {
    animation: indicatorAppear 0.5s ease-out;
}

@keyframes indicatorAppear {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.3) rotate(360deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1400px) {
    .main-game {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar > div {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .game-info {
        flex-direction: column;
        gap: 10px;
    }

    .space {
        font-size: 0.55em;
    }

    .center-board h2 {
        font-size: 1.2em;
    }

    .die {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
}
