/* ==================== ROOT & VARIABLES ==================== */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #ffa502;
    --accent-color: #6c5ce7;
    --success-color: #00b894;
    --bg-light: #f8f9fa;
    --bg-dark: #2d3436;
    --text-dark: #2d3436;
    --text-light: #ffffff;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b9d, #ffa502);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b9d, #ffa502);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    color: white;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

#confettiCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: slideUp 0.8s ease;
}

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

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.8s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInDelay 1s ease 0.2s both;
}

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

.cta-button {
    background: linear-gradient(135deg, #ff6b9d, #ffa502);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
    animation: fadeInDelay 1s ease 0.4s both;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 107, 157, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

/* ==================== SECTION STYLES ==================== */
section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #ff6b9d, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== CREATE SECTION ==================== */
.create-section {
    background: white;
    position: relative;
    z-index: 5;
}

.create-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.form-wrapper {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-input {
    width: 60px;
    height: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.color-input:hover {
    border-color: var(--primary-color);
}

#colorDisplay {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--text-dark);
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #ffa502);
    color: white;
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
    width: 100%;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

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

/* ==================== PREVIEW SECTION ==================== */
.preview-wrapper {
    display: flex;
    flex-direction: column;
}

.preview-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.wish-preview {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.preview-placeholder {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
}

/* ==================== WISH CARD ==================== */
.wish-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.wish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.wish-card.preview::before {
    display: none;
}

.wish-name {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.wish-message {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 1.5rem 0;
    font-style: italic;
}

.wish-from {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1rem;
}

.wish-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.wish-actions button {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.wish-actions button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== FEATURES SECTION ==================== */
.features-section {
    background: white;
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ==================== GALLERY SECTION ==================== */
.gallery-section {
    background: white;
    padding: 80px 0;
}

.gallery-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.wishes-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.2rem;
}

.gallery-item {
    cursor: pointer;
    transition: var(--transition);
    animation: slideInUp 0.5s ease;
}

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

.gallery-item:hover .wish-card {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* ==================== ABOUT SECTION ==================== */
.about-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.about-section .section-title {
    color: white;
    -webkit-text-fill-color: white;
}

.about-content {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .create-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .wishes-gallery {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .gallery-controls {
        flex-direction: column;
    }

    .gallery-controls .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .form-wrapper {
        padding: 1.5rem;
    }

    .wish-card {
        padding: 1.5rem;
    }

    .features-grid {
        gap: 1rem;
    }

    .feature-icon {
        font-size: 2rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.pulse {
    animation: pulse 2s infinite;
}

.bounce {
    animation: bounce 1s ease-in-out;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .navbar,
    .gallery-controls,
    .wish-actions,
    .footer,
    .button-group {
        display: none;
    }

    .wish-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
