:root {
    --red-primary: #A62639;
    --red-dark: #7D1E2C;
    --green-primary: #1B5E20;
    --green-dark: #0D3D12;
    --gold: #D4AF37;
    --gold-light: #F4E5B2;
    --cream: #FFF8F0;
    --cream-dark: #F5EBE0;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-primary) 50%, var(--green-dark) 100%);
    min-height: 100vh;
    color: var(--cream);
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Snowflakes */
.snowflakes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: fall linear infinite;
    filter: blur(1px);
}

@keyframes fall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0.3; }
}

/* Header */
.app-header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-icon {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header-title {
    font-family: 'Crimson Pro', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
    font-size: 1rem;
    color: var(--cream);
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    position: relative;
    z-index: 10;
}

.wizard-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Progress Indicator */
.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--gold);
}

.step-dot.current {
    box-shadow: 0 0 20px var(--gold);
    transform: scale(1.1);
}

.step-number {
    font-weight: 600;
    font-size: 0.875rem;
}

.step-label {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    display: none;
}

@media (min-width: 640px) {
    .step-label {
        display: inline;
    }
}

.step-line {
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 0.5rem;
    transition: background 0.3s ease;
}

.step-line.completed {
    background: var(--gold);
}

/* Step Content */
.step-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.step-subtitle {
    text-align: center;
    color: var(--cream);
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.upload-zone.has-image {
    padding: 1rem;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    opacity: 0.6;
}

.preview-container {
    position: relative;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.change-photo-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.change-photo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Characters Grid */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .characters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.character-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.character-card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.character-card.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.character-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.character-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.character-desc {
    font-size: 0.75rem;
    opacity: 0.7;
}

.check-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--red-dark);
}

/* Scenes Grid */
.scenes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .scenes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.scene-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.scene-card:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.15);
}

.scene-card.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
}

.scene-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.scene-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.scene-desc {
    font-size: 0.75rem;
    opacity: 0.7;
}

.radio-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
}

/* Style Options */
.style-section {
    margin-bottom: 1.5rem;
}

.style-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gold-light);
}

.tone-options {
    display: flex;
    gap: 1rem;
}

.tone-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tone-card.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
}

.tone-swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin: 0 auto 0.5rem;
}

.tone-swatch.warm {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6347);
}

.tone-swatch.cool {
    background: linear-gradient(135deg, #87CEEB, #4682B4, #191970);
}

.tone-desc {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
}

.frame-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.frame-tint {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.frame-tint:hover {
    transform: scale(1.1);
}

.frame-tint.selected {
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold);
}

.tint-check {
    color: var(--green-primary);
    font-weight: bold;
}

/* Buttons */
.step-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.next-btn, .back-btn, .generate-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
}

.next-btn {
    background: linear-gradient(135deg, var(--gold), #E6C54D);
    color: var(--red-dark);
    flex: 1;
}

.next-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5);
}

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

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.back-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.generate-btn {
    background: linear-gradient(135deg, var(--gold), #E6C54D, var(--gold));
    background-size: 200% 200%;
    animation: shimmer 3s ease infinite;
    color: var(--red-dark);
    flex: 1;
    font-size: 1.125rem;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(212, 175, 55, 0.6);
}

.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--red-dark);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.randomize-btn {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: var(--cream);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.randomize-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Result */
.result-container {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.result-title {
    font-family: 'Crimson Pro', serif;
    font-size: 2rem;
    color: var(--gold-light);
    margin-bottom: 2rem;
}

.polaroid-frame {
    display: inline-block;
    padding: 1rem 1rem 3rem 1rem;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: polaroidReveal 0.8s ease;
}

@keyframes polaroidReveal {
    0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(var(--rotation, 0deg)); opacity: 1; }
}

.polaroid-inner {
    overflow: hidden;
    border-radius: 2px;
}

.polaroid-image {
    width: 280px;
    height: 280px;
    object-fit: cover;
    display: block;
}

@media (min-width: 640px) {
    .polaroid-image {
        width: 350px;
        height: 350px;
    }
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.download-btn, .reset-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
}

.download-btn {
    background: var(--green-primary);
    color: white;
}

.download-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
    color: var(--cream);
    opacity: 0.8;
}

.footer-snow {
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin-bottom: 1rem;
}

.app-footer a {
    color: var(--gold-light);
    text-decoration: none;
    font-weight: 600;
}

.app-footer a:hover {
    text-decoration: underline;
}

.strawberry {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

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

.footer-wish {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    margin-top: 0.5rem;
    color: var(--gold-light);
}

/* Responsive */
@media (max-width: 480px) {
    .header-title {
        font-size: 1.75rem;
    }
    
    .wizard-container {
        padding: 1.5rem;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .characters-grid, .scenes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .character-card, .scene-card {
        padding: 1rem 0.75rem;
    }
    
    .tone-options {
        flex-direction: column;
    }
}