/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
    --background: hsl(30, 50%, 97%);
    --foreground: hsl(350, 30%, 20%);
    --primary: hsl(350, 60%, 65%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(30, 40%, 92%);
    --muted: hsl(30, 30%, 94%);
    --muted-foreground: hsl(350, 15%, 50%);
    --border: hsl(350, 25%, 88%);
    --rose-soft: hsl(350, 80%, 90%);
    --gold: hsl(40, 70%, 55%);
    --gold-light: hsl(40, 60%, 85%);
    --blush: hsl(10, 60%, 92%);
    --cream: hsl(35, 50%, 96%);
}

/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: #ebe3d9;
    min-height: 100vh;
    padding: 40px 20px;
}

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

/* ===========================
   HEADER
   =========================== */
header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--primary);
    font-family: 'Sacramento', cursive;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.logo .heart {
    color: var(--primary);
    font-size: 2.8rem;
}

.subtitle {
    font-size: 1rem;
    color: #8b7a6a;
    font-weight: 500;
}

/* ===========================
   STEP INDICATOR
   =========================== */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    animation: fadeIn 1s ease;
}

.step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #d4c4b4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
}

.step-circle.active {
    background: var(--primary);
    transform: scale(1.1);
}

.step-line {
    width: 50px;
    height: 2px;
    background: #d4c4b4;
    transition: all 0.4s ease;
}

.step-line.active {
    background: var(--primary);
}

/* ===========================
   CONTENT SECTIONS
   =========================== */
.content-section {
    animation: fadeInUp 0.8s ease;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: slideIn 0.5s ease;
}

h2 {
    text-align: center;
    font-size: 2rem;
    color: #4a3f35;
    margin-bottom: 10px;
    font-weight: 600;
}

.section-subtitle {
    text-align: center;
    color: #8b7a6a;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* ===========================
   GIFT GRID
   =========================== */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.gift-item {
    background: white;
    border: 2px solid #e8ddd4;
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gift-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.gift-item.selected {
    border-color: var(--primary);
    background: var(--rose-soft);
    border-width: 2.5px;
}

.gift-item.selected::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 3px 10px hsla(350, 60%, 65%, 0.4);
}

.gift-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.gift-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #4a3f35;
}

/* ===========================
   FORM SECTION
   =========================== */
.form-section {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #4a3f35;
    font-weight: 600;
    font-size: 0.9rem;
}

input, textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8ddd4;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px hsla(350, 60%, 65%, 0.1);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

/* ===========================
   BUTTONS
   =========================== */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 40px;
    justify-content: center;
}

button {
    padding: 12px 35px;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
}

.btn-primary {
    background: #DB7082;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px hsla(350, 60%, 65%, 0.3);
}

.btn-primary:disabled {
    background: #e5aec0;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #d4c4b4;
    color: #4a3f35;
}

.btn-secondary:hover {
    background: #c4b4a4;
    transform: translateY(-2px);
}

/* ===========================
   WRAPPING ANIMATION
   =========================== */
.wrapping-animation {
    text-align: center;
    padding: 80px 20px;
}

.gift-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    position: relative;
}

.box {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), hsl(350, 50%, 75%));
    border-radius: 15px;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.ribbon-h {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(180deg, var(--gold), var(--gold-light));
    transform: translateY(-50%);
}

.ribbon-v {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: translateX(-50%);
}

.bow {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.wrapping-text {
    font-size: 1.2rem;
    color: #4a3f35;
    margin-bottom: 12px;
}

.wrapping-subtext {
    color: #8b7a6a;
    font-size: 0.9rem;
}

/* ===========================
   SUCCESS MESSAGE
   =========================== */
.success-message {
    text-align: center;
    padding: 50px 30px;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.wrapped-heart {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 1s ease;
}

.heart-icon {
    font-size: 5rem;
    position: relative;
    z-index: 2;
}

.success-message h2 {
    color: #4a3f35;
    margin-bottom: 8px;
    font-size: 2rem;
}

.success-subtext {
    color: #8b7a6a;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.gift-icon-display {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: #fef5f0;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.message-box {
    background: #fce4ec;
    border-radius: 20px;
    padding: 20px 25px;
    margin: 20px 0 30px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 2px solid #f8bbd0;
}

.message-content {
    color: #4a3f35;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
    min-height: 30px;
    font-style: italic;
}

.message-signature {
    color: #8b7a6a;
    font-size: 0.9rem;
    text-align: right;
    font-weight: 600;
}

.message-signature span {
    color: var(--primary);
}

.btn-send-another {
    margin-top: 10px;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: bounce 1s ease;
}

.success-message p {
    color: #8b7a6a;
    margin-bottom: 40px;
    font-size: 1rem;
}

.success-message .final-email {
    color: var(--primary);
    font-weight: 600;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .gift-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .form-section {
        padding: 30px 25px;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .step-indicator {
        gap: 15px;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-line {
        width: 35px;
    }
}

@media (max-width: 480px) {
    .gift-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}