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

:root {
    --primary-color: #25D366;
    --primary-dark: #128C7E;
    --secondary-color: #075E54;
    --accent-color: #34B7F1;
    --background-color: #ECE5DD;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-light: #667781;
    --error-color: #DC3545;
    --success-color: #28A745;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

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

header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.step {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: none;
    animation: fadeIn 0.3s ease;
}

.step.active {
    display: block;
}

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

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--background-color);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-header h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.step-content {
    padding: 10px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--text-color);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover:not(:disabled) {
    background: #e8e8e8;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn .btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.person-preview {
    text-align: center;
    margin-bottom: 20px;
}

.image-container {
    display: inline-block;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.image-container img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    display: block;
}

.prompt-text {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: left;
    max-height: 100px;
    overflow-y: auto;
}

.sticker-info {
    margin-bottom: 25px;
}

.sticker-info h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.emotions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.emotion-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
    gap: 6px;
}

.emotion-tag .emoji {
    font-size: 1.1rem;
}

.progress-container {
    margin-top: 25px;
    text-align: center;
}

.progress-container.hidden {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

#progressText {
    margin-top: 10px;
    color: var(--text-light);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.sticker-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.sticker-item:hover {
    transform: scale(1.05);
}

.sticker-item img {
    width: 100%;
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.sticker-item .sticker-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.sticker-item .download-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
}

.sticker-item .download-btn:hover {
    background: var(--primary-dark);
}

.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message-container.hidden {
    display: none;
}

.message {
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message.success {
    background: var(--success-color);
    color: white;
}

.message.error {
    background: var(--error-color);
    color: white;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .step {
        padding: 20px 15px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .sticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}
