* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.auth-switch {
    margin-top: 20px;
    font-size: 14px;
}

.auth-switch a {
    color: #3498db;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

#user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ecf0f1;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

#logout-btn {
    padding: 8px 15px;
    background-color: #e74c3c;
    font-size: 14px;
}

#logout-btn:hover {
    background-color: #c0392b;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

#game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-top: 20px;
}

#header {
    text-align: center;
    margin-bottom: 20px;
}

#header h1 {
    color: #2c3e50;
    font-size: 2.5em;
}

#progress-section {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#progress-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

#progress-bar {
    flex-grow: 1;
    height: 30px;
    background-color: #bdc3c7;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    margin-left: 15px;
    font-weight: bold;
    font-size: 1.2em;
    min-width: 50px;
}

#progress-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#progress-controls button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#click-btn {
    background-color: #3498db;
    color: white;
}

#click-btn:hover {
    background-color: #2980b9;
}

#auto-btn {
    background-color: #2ecc71;
    color: white;
}

#auto-btn:hover {
    background-color: #27ae60;
}

#player-stats {
    background-color: #fff8e1;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#player-stats h2 {
    color: #ff9800;
    margin-bottom: 15px;
    text-align: center;
}

#stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background-color: #ffecb3;
    border-radius: 5px;
}

.stat-name {
    font-weight: bold;
}

#game-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

#map-info, #events-section {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
}

#map-info h2, #events-section h2 {
    color: #1976d2;
    margin-bottom: 15px;
    text-align: center;
}

#current-map {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #0d47a1;
}

#event-log {
    min-height: 150px;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #bbdefb;
}
 
#event-log p {
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 3px;
}

.event-item {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.event-time {
    color: #1976d2;
    margin-right: 10px;
    min-width: 80px;
    font-weight: bold;
}

.event-message {
    color: #333;
}

#inventory-section {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
}

#inventory-section h2 {
    color: #388e3c;
    margin-bottom: 15px;
    text-align: center;
}

#inventory-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.inventory-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(56, 142, 60, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
}

.stat-name {
    font-weight: bold;
    color: #388e3c;
}

#inventory-container {
    min-height: 100px;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #c8e6c9;
}

#inventory-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inventory-item {
    padding: 8px 12px;
    background-color: #c8e6c9;
    border-radius: 5px;
    font-size: 0.9em;
    margin: 2px;
    display: inline-block;
}

.inventory-item.rarity-common {
    background-color: #95a5a6;
    color: white;
}

.inventory-item.rarity-rare {
    background-color: #3498db;
    color: white;
}

.inventory-item.rarity-epic {
    background-color: #9b59b6;
    color: white;
}

.inventory-item.rarity-legend {
    background-color: #f1c40f;
    color: black;
}

.inventory-item.rarity-mythic {
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

#pokedex-section {
    background-color: #fce4ec;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

#pokedex-section h2 {
    color: #e91e63;
    margin-bottom: 15px;
    text-align: center;
}

#pokedex-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.pokedex-stat {
    padding: 8px 12px;
    background-color: #f8bbd0;
    border-radius: 5px;
    font-size: 0.9em;
    min-width: 80px;
    text-align: center;
}

#pokedex-container {
    min-height: 150px;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f48fb1;
}

#pokedex-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.pokedex-item {
    padding: 10px;
    background-color: #f8bbd0;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.pokedex-item:hover {
    transform: scale(1.05);
}

.pokedex-item-art {
    width: 80px;
    height: 80px;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pokedex-item-name {
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pokedex-item-rarity {
    font-size: 0.7em;
    padding: 2px 4px;
    border-radius: 3px;
}

.rarity-common { background-color: #95a5a6; color: white; }
.rarity-rare { background-color: #3498db; color: white; }
.rarity-epic { background-color: #9b59b6; color: white; }
.rarity-legend { background-color: #f1c40f; color: black; }
.rarity-mythic { background-color: #e74c3c; color: white; }

@media (max-width: 768px) {
    #game-content {
        grid-template-columns: 1fr;
    }
    
    #stats-container {
        grid-template-columns: 1fr 1fr;
    }
    
    #progress-controls {
        flex-direction: column;
        align-items: center;
    }
    
    #progress-controls button {
        width: 80%;
    }
}

/* 时间商店模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#time-shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.time-shop-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    background-color: #f9f9f9;
}

.time-shop-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.time-shop-item p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

.time-shop-item button {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.time-shop-item button:hover {
    background-color: #2980b9;
}

.time-shop-item button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#time-fragments-display {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
}