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

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #8B4513 0%, #CD853F 50%, #DAA520 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .game-container {
            background: white;
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            max-width: 1400px;
            width: 100%;
        }

        h1 {
            text-align: center;
            color: #8B4513;
            margin-bottom: 20px;
            font-size: 2.5rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        }

        .game-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .info-card {
            background: #FFF8DC;
            padding: 12px;
            border-radius: 12px;
            text-align: center;
            border: 2px solid #DAA520;
        }

        .info-label {
            color: #8B4513;
            font-size: 0.8rem;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .info-value {
            color: #4A4A4A;
            font-size: 1.1rem;
            font-weight: bold;
        }

        .controls {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        button {
            background: #8B4513;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        button:hover {
            background: #A0522D;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        button:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        .game-board {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 20px;
            margin: 20px 0;
            min-height: 600px;
        }

        .map-section {
            background: #F0E68C;
            border-radius: 15px;
            padding: 15px;
            border: 2px solid #DAA520;
        }

        .section-title {
            text-align: center;
            color: #8B4513;
            font-weight: bold;
            margin-bottom: 15px;
            font-size: 1.2rem;
        }

        .city-grid {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            grid-template-rows: repeat(6, 1fr);
            gap: 2px;
            height: 360px;
            background: #DAA520;
            border-radius: 10px;
            padding: 8px;
        }

        .tile {
            background: #90EE90;
            border-radius: 6px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            border: 2px solid transparent;
        }

        .tile:hover {
            transform: scale(1.1);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .tile.selected {
            border-color: #FF6B35;
            background: #FFE4B5;
        }

        .tile.forest { background: #228B22; }
        .tile.mountain { background: #696969; color: white; }
        .tile.water { background: #4682B4; color: white; }
        .tile.desert { background: #F4A460; }
        .tile.plains { background: #9ACD32; }

        .building {
            position: absolute;
            width: 80%;
            height: 80%;
            border-radius: 4px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 0.7rem;
            font-weight: bold;
            color: white;
        }

        .building.city { background: #8B4513; }
        .building.farm { background: #32CD32; }
        .building.mine { background: #708090; }
        .building.lumber { background: #8B4513; }
        .building.barracks { background: #B22222; }
        .building.library { background: #4169E1; }

        .resources-section {
            background: #FFF8DC;
            border-radius: 15px;
            padding: 15px;
            border: 2px solid #DAA520;
        }

        .resource-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px;
            margin: 5px 0;
            background: white;
            border-radius: 8px;
            border: 1px solid #DAA520;
        }

        .resource-name {
            font-weight: bold;
            color: #8B4513;
        }

        .resource-value {
            color: #4A4A4A;
            font-weight: bold;
        }

        .resource-change {
            font-size: 0.8rem;
            color: #27ae60;
        }

        .resource-change.negative {
            color: #e74c3c;
        }

        .buildings-section {
            background: #FFF8DC;
            border-radius: 15px;
            padding: 15px;
            border: 2px solid #DAA520;
        }

        .building-item {
            background: white;
            border-radius: 8px;
            padding: 10px;
            margin: 8px 0;
            border: 2px solid #DAA520;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .building-item:hover {
            transform: scale(1.02);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .building-item.affordable {
            border-color: #27ae60;
        }

        .building-item.expensive {
            border-color: #e74c3c;
            opacity: 0.7;
        }

        .building-name {
            font-weight: bold;
            color: #8B4513;
            margin-bottom: 5px;
        }

        .building-cost {
            font-size: 0.8rem;
            color: #666;
        }

        .building-effect {
            font-size: 0.8rem;
            color: #27ae60;
            margin-top: 5px;
        }

        .tech-tree {
            background: #E6E6FA;
            border-radius: 15px;
            padding: 15px;
            border: 2px solid #9370DB;
            margin-top: 15px;
        }

        .tech-item {
            background: white;
            border-radius: 8px;
            padding: 8px;
            margin: 5px 0;
            border: 2px solid #9370DB;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .tech-item:hover {
            transform: scale(1.02);
        }

        .tech-item.researched {
            background: #E6E6FA;
            border-color: #32CD32;
        }

        .tech-item.affordable {
            border-color: #27ae60;
        }

        .tech-item.expensive {
            border-color: #e74c3c;
            opacity: 0.7;
        }

        .turn-info {
            background: #F0E68C;
            border-radius: 15px;
            padding: 15px;
            margin-top: 15px;
            text-align: center;
            border: 2px solid #DAA520;
        }

        .turn-counter {
            font-size: 1.5rem;
            font-weight: bold;
            color: #8B4513;
            margin-bottom: 10px;
        }

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

        .action-btn {
            background: #CD853F;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }

        .action-btn:hover {
            background: #B8860B;
        }

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

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

        .popup-content {
            background: white;
            padding: 30px;
            border-radius: 20px;
            text-align: center;
            animation: popupAppear 0.3s ease-out;
            border: 3px solid #8B4513;
            max-width: 500px;
            width: 90%;
        }

        @keyframes popupAppear {
            0% { transform: scale(0.5); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        .achievement {
            background: #fff3cd;
            border: 2px solid #ffeaa7;
            color: #856404;
            padding: 10px;
            border-radius: 10px;
            margin: 10px 0;
            text-align: center;
        }

        .progress-bar {
            background: #e0e0e0;
            height: 8px;
            border-radius: 4px;
            margin: 5px 0;
            overflow: hidden;
        }

        .progress-fill {
            background: #27ae60;
            height: 100%;
            transition: width 0.3s ease;
        }

        @media (max-width: 768px) {
            .game-container {
                padding: 15px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .game-board {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .city-grid {
                grid-template-columns: repeat(6, 1fr);
                grid-template-rows: repeat(4, 1fr);
                height: 240px;
            }
            
            .game-info {
                grid-template-columns: repeat(3, 1fr);
            }
        }