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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen {
    display: none;
    width: 100%;
    height: 100vh;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

/* Login Screen */
.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 300px;
}

.login-container h1 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.login-container button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #5568d3;
}

/* Menu Screen */
.menu-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 400px;
}

.menu-container h1 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 3em;
}

#editionInfo {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.menu-container button {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

.menu-container button:hover {
    background: #5568d3;
}

/* Store Screen */
.store-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
}

.store-container h2 {
    color: #667eea;
    margin-bottom: 20px;
}

#editionList {
    margin: 20px 0;
}

.edition-item {
    background: #f9f9f9;
    padding: 20px;
    margin: 10px 0;
    border-radius: 5px;
    border: 2px solid #ddd;
}

.edition-item.owned {
    background: #e8f5e9;
    border-color: #4caf50;
}

.edition-item.current {
    background: #e3f2fd;
    border-color: #2196f3;
}

.edition-item h3 {
    color: #333;
    margin-bottom: 10px;
}

.edition-item button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.edition-item button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Game Screen */
#gameScreen {
    flex-direction: column;
    background: #000;
}

.game-hud {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#gameCanvas {
    background: #2c3e50;
    display: block;
}

.game-hud button {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Home Screen */
.home-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 500px;
    max-width: 600px;
}

.home-container h1 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 3em;
}

.nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.nav-buttons button {
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-buttons button:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.nav-buttons button.flashing {
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { background: #667eea; }
    50% { background: #ffd700; color: #000; }
}

/* Creation Screens */
.creation-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.creation-container h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.creation-container button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

.creation-container button:hover {
    background: #45a049;
}

/* Avatar Preview */
.avatar-preview {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

/* Color Picker */
.customization-options {
    text-align: left;
    margin: 20px 0;
}

.customization-options label {
    display: block;
    margin: 15px 0 5px 0;
    font-weight: bold;
    color: #333;
}

.color-picker {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-option:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.customization-options select {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

/* Pet Grid */
.pet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.pet-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.pet-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pet-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 10px;
}

.pet-card h3 {
    color: #333;
    margin: 10px 0;
}

.pet-card p {
    color: #666;
    font-size: 0.9em;
}

/* Hatchery Preview */
.hatchery-preview {
    margin: 20px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 10px;
}

/* Profile Form */
.profile-form {
    text-align: left;
    margin: 20px 0;
}

.profile-form label {
    display: block;
    margin: 15px 0 5px 0;
    font-weight: bold;
    color: #333;
}

.profile-form input {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

#profilePreview {
    margin-top: 20px;
}
