* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.card {
    background: white;
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-height: 480px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.step.active {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.3);
}

.step.completed {
    background: #4caf50;
    color: white;
}

.step-line {
    width: 40px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 8px;
    border-radius: 2px;
    transition: background 0.3s;
}

.step-line.active {
    background: #4caf50;
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Header */
.step-header {
    text-align: center;
    margin-bottom: 24px;
}

.tree-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
}

.step-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1a472a;
    margin-bottom: 6px;
}

.step-header p {
    color: #666;
    font-size: 14px;
}

/* Ornament Grid */
.ornament-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.ornament {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ornament:hover {
    border-color: #1a472a;
    background: #f0f7f0;
    transform: translateY(-2px);
}

.ornament.selected {
    border-color: #1a472a;
    background: #e8f5e9;
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.2);
}

.ornament-emoji {
    font-size: 28px;
}

.ornament small {
    font-size: 11px;
    color: #666;
    font-weight: 600;
}

/* Name Options */
.name-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.name-option {
    flex: 1;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.name-option:hover {
    border-color: #1a472a;
    background: #f0f7f0;
}

.name-option.selected {
    border-color: #1a472a;
    background: #e8f5e9;
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.2);
}

.option-icon {
    font-size: 32px;
}

.option-text {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

/* Custom Name Input */
.custom-name-input {
    margin-bottom: 16px;
}

.custom-name-input.hidden {
    display: none;
}

.custom-name-input input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-name-input input:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.1);
}

/* Message Wrapper */
.message-wrapper {
    position: relative;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fafafa;
    min-height: 140px;
}

textarea:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.1);
    background: white;
}

textarea::placeholder {
    color: #999;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* Buttons */
.btn-next, .btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(26, 71, 42, 0.3);
}

.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 71, 42, 0.4);
}

.btn-submit {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.step-buttons {
    display: flex;
    gap: 12px;
}

.btn-back {
    flex: 0 0 100px;
    padding: 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    color: #666;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.step-buttons .btn-next,
.step-buttons .btn-submit {
    flex: 1;
}

/* Success Screen */
.success-content {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    display: block;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.success-content h2 {
    color: #1a472a;
    font-size: 24px;
    margin-bottom: 8px;
}

.success-content p {
    color: #666;
    margin-bottom: 28px;
    font-size: 15px;
}

.btn-new {
    padding: 14px 28px;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(26, 71, 42, 0.3);
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 71, 42, 0.4);
}

/* Loading State */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading.hidden {
    display: none;
}

.btn-submit:disabled .btn-text {
    display: none;
}

.btn-submit:disabled .btn-loading {
    display: inline;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 20px;
    color: white;
}

.footer p {
    font-size: 13px;
    opacity: 0.8;
}

/* Snowflakes Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: white;
    font-size: 1.5em;
    opacity: 0.8;
    animation: fall linear infinite;
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 1em; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 1s; font-size: 1.2em; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 8s; animation-delay: 2s; font-size: 0.8em; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.4em; }
.snowflake:nth-child(5) { left: 55%; animation-duration: 11s; animation-delay: 3s; font-size: 1em; }
.snowflake:nth-child(6) { left: 70%; animation-duration: 9s; animation-delay: 1.5s; font-size: 1.3em; }
.snowflake:nth-child(7) { left: 85%; animation-duration: 13s; animation-delay: 2.5s; font-size: 0.9em; }
.snowflake:nth-child(8) { left: 95%; animation-duration: 10s; animation-delay: 4s; font-size: 1.1em; }

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Error State */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* Responsive */
@media (max-width: 400px) {
    .card {
        padding: 24px 20px;
    }

    .step-header h2 {
        font-size: 20px;
    }

    .tree-icon {
        font-size: 48px;
    }

    .ornament {
        padding: 12px 6px;
    }

    .ornament-emoji {
        font-size: 24px;
    }
}
