/* Base styles and design system */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
}

/* App container with dynamic backgrounds */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: background 1s ease;
}

/* Background states */
.bg-neutral {
    background: linear-gradient(to bottom, #9ca3af, #6b7280);
}

.bg-healthy {
    background: linear-gradient(to bottom, #93c5fd, #86efac);
}

.bg-balanced {
    background: linear-gradient(to bottom, #86efac, #bfdbfe, #86efac);
}

.bg-fried {
    background: linear-gradient(to bottom, #f87171, #fde68a, #fef3c7);
}

.bg-drowned {
    background: linear-gradient(to bottom, #2563eb, #60a5fa, #bfdbfe);
}

.bg-overwhelmed {
    background: linear-gradient(to bottom, #374151, #111827);
}

.bg-stressed {
    background: linear-gradient(to bottom, #9ca3af, #6b7280);
}

/* Main card */
.main-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
    text-align: center;
}

/* Header */
.title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stats {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.stats p {
    margin-bottom: 0.25rem;
}

.session-stats {
    font-size: 0.875rem;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.recovery-text {
    font-size: 0.75rem;
    color: #059669;
}

/* Plant container */
.plant-container {
    margin-bottom: 2rem;
    position: relative;
}

.plant-wrapper {
    transition: transform 0.5s ease;
}

.plant-wrapper.watering {
    transform: scale(1.05) rotate(1deg);
}

.plant-wrapper.sunning {
    transform: scale(1.05) rotate(-1deg);
}

/* Sun indicator */
.sun-indicator {
    position: absolute;
    top: -1rem;
    right: -1rem;
    z-index: 10;
}

.sun-icon {
    font-size: 2rem;
    opacity: 0.3;
    transition: all 0.5s ease;
}

.sun-icon.active {
    opacity: 1;
}

.sun-icon.hot {
    font-size: 3rem;
    color: #f97316;
}

.sun-icon.burning {
    font-size: 4rem;
    color: #dc2626;
    animation: pulse 1s infinite;
}

.sun-icon.animating {
    transform: scale(1.25) rotate(12deg);
}

/* Plant SVG */
.plant-svg-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.plant-svg {
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

/* Progress indicator */
.progress-indicator {
    font-size: 0.875rem;
    color: #4b5563;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Speech bubble */
.speech-bubble {
    background: #f3f4f6;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    border: 2px solid #d1d5db;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid #d1d5db;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #f3f4f6;
}

#roast-text {
    color: #1f2937;
    font-weight: 500;
    font-style: italic;
    margin: 0;
}

/* Button container */
.button-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Action buttons */
.action-button {
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    transform: scale(1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    flex: 1;
    border: none;
    cursor: pointer;
    color: white;
}

.action-button:hover {
    transform: scale(1.05);
}

.action-button:active {
    transform: scale(0.95);
}

.water-button {
    background: #3b82f6;
}

.water-button:hover {
    background: #2563eb;
}

.sun-button {
    background: #eab308;
}

.sun-button:hover {
    background: #ca8a04;
}

/* Achievements */
.achievements-container {
    margin-top: 1.5rem;
}

.achievements-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.achievement-name {
    font-weight: 500;
    color: #92400e;
}

.achievement-roast {
    color: #a16207;
    font-style: italic;
}

/* Status container */
.status-container {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.status-title {
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}

.status-message {
    font-size: 0.75rem;
}

.status-message p {
    margin-bottom: 0.25rem;
}

/* Footer */
.footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive design */
@media (max-width: 640px) {
    .app-container {
        padding: 1rem;
    }
    
    .main-card {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    .action-button {
        margin-bottom: 0.5rem;
    }
}