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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    text-align: center;
    color: white;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin-top: 10px;
}

.section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.pet-type-card {
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

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

.pet-type-card .pet-icon {
    font-size: 4em;
    margin-bottom: 10px;
}

.pet-type-card .pet-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.pets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.pet-card {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.pet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.pet-card.dead::before {
    background: linear-gradient(90deg, #666, #444);
}

.pet-card.dead {
    opacity: 0.7;
    filter: grayscale(50%);
}

.pet-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.pet-avatar {
    font-size: 3.5em;
}

.pet-info h3 {
    color: #333;
    font-size: 1.3em;
}

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

.pet-stats {
    margin: 15px 0;
}

.stat-row {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.stat-label {
    width: 70px;
    font-weight: bold;
    color: #555;
}

.stat-bar {
    flex: 1;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 10px;
}

.stat-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.stat-fill.health {
    background: linear-gradient(90deg, #ff6b6b, #ee5a5a);
}

.stat-fill.happiness {
    background: linear-gradient(90deg, #ffd93d, #ffcd1d);
}

.stat-fill.hunger {
    background: linear-gradient(90deg, #6bcb77, #5ab568);
}

.stat-value {
    width: 40px;
    text-align: right;
    font-weight: bold;
    color: #555;
}

.pet-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-feed {
    background: linear-gradient(145deg, #6bcb77, #5ab568);
    color: white;
}

.btn-play {
    background: linear-gradient(145deg, #ffd93d, #ffcd1d);
    color: #333;
}

.btn-revive {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-delete {
    background: linear-gradient(145deg, #ff6b6b, #ee5a5a);
    color: white;
    margin-top: 10px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

#pet-name-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: center;
}

#pet-name-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.dead-pets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.dead-pet-card {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    opacity: 0.7;
}

.dead-pet-card .pet-icon {
    font-size: 2.5em;
    filter: grayscale(100%);
}

.dead-pet-card h4 {
    color: #666;
    margin: 10px 0;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 1.1em;
}

.status-indicator {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-alive {
    background: #d4edda;
    color: #155724;
}

.status-dead {
    background: #f8d7da;
    color: #721c24;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pet-card:not(.dead) .pet-avatar {
    animation: pulse 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.pet-card.critical .pet-avatar {
    animation: shake 0.5s infinite;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #667eea;
}

.filter-btn.active {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.gender-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 5px;
}

.gender-badge.male {
    background: #e3f2fd;
    color: #1976d2;
}

.gender-badge.female {
    background: #fce4ec;
    color: #c2185b;
}

.gender-select {
    margin-bottom: 15px;
}

.gender-select label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
}

.gender-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.gender-btn:hover {
    border-color: #667eea;
}

.gender-btn.active {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.btn-breed {
    background: linear-gradient(145deg, #ff69b4, #ff1493);
    color: white;
}

.btn-breed:hover {
    background: linear-gradient(145deg, #ff1493, #ff69b4);
}

#breed-modal .modal-content {
    max-width: 600px;
}

.breed-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.breed-pet-select {
    flex: 1;
}

.breed-pet-select h4 {
    margin-bottom: 10px;
    color: #555;
}

.breed-pets-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 10px;
}

.breed-pet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.breed-pet-item:hover {
    background: #f0f0f0;
}

.breed-pet-item.selected {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.breed-pet-icon {
    font-size: 1.5em;
}

.breed-pet-name {
    font-weight: bold;
}

.breed-heart {
    font-size: 2em;
    color: #ff69b4;
}

.baby-name-section {
    margin: 15px 0;
}

#baby-name-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    text-align: center;
}

.food-inventory {
    display: inline-block;
    background: linear-gradient(145deg, #ff6b6b, #ee5a5a);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    margin: 5px 0;
}

.btn-daily {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    color: white;
}

.btn-daily:hover {
    background: linear-gradient(145deg, #e67e22, #d35400);
}

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

.pet-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#baby-name-input:focus {
    outline: none;
    border-color: #667eea;
}

.food-storage-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding: 12px 20px;
    background: linear-gradient(145deg, #fff5f5, #ffe0e0);
    border-radius: 25px;
    display: inline-flex;
}

.food-storage-icon {
    font-size: 1.5em;
}

#storage-food-count {
    font-size: 1.2em;
    color: #d63031;
}

.btn-claim-daily {
    background: linear-gradient(145deg, #00b894, #00a381);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-claim-daily:hover {
    background: linear-gradient(145deg, #00a381, #009874);
    transform: scale(1.05);
}

.no-pets {
    color: #999;
    font-style: italic;
    padding: 20px;
}

.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px 20px;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 9999;
}

.music-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
}

#music-volume {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
}

#music-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    border-radius: 50%;
    cursor: pointer;
}
