:root {
    --primary-color: #ff9ff3;
    --secondary-color: #feca57;
    --accent-color: #54a0ff;
    --text-color: #2d3436;
    --bg-color: #fff0f5;
    --editor-bg: #ffffff;
    --font-heading: 'Great Vibes', cursive;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

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

.floating-item {
    position: absolute;
    bottom: -100px;
    font-size: 2rem;
    animation: floatUp 8s linear infinite;
    opacity: 0.6;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* --- OVERLAY STYLES --- */
.open-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    cursor: pointer;
}

.overlay-content {
    animation: fadeIn 1s ease;
}

.icon-pulse {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

/* --- EDITOR PANEL STYLES --- */
.editor-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    height: 100vh;
    background: var(--editor-bg);
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
    display: none;
}

.editor-panel.active {
    display: block;
}

.tutorial-link {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #e8f7ff;
    color: #0984e3;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #74b9ff;
}

body.editor-mode #mainContent {
    margin-left: 350px;
    width: calc(100% - 350px);
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
}

/* Media & Wishes Dynamic List Styles */
.media-editor,
.wishes-editor {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.input-item {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    border: 1px solid #eee;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff7675;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-btn,
.secondary-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    margin-top: 10px;
}

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

.primary-btn:hover {
    background: #2e86de;
}

.secondary-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.secondary-btn:hover {
    background: #dfe6e9;
}

/* Link Result Area */
.link-result {
    margin-top: 20px;
    padding: 15px;
    background: #f0fff4;
    border: 1px solid #b2bec3;
    border-radius: 8px;
}

.full-link-box {
    width: 100%;
    height: 60px;
    font-size: 0.8rem;
    padding: 5px;
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    resize: none;
}

.small-btn {
    padding: 8px;
    font-size: 0.9rem;
}

.small-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* --- VIEWER STYLES --- */
.recipient-name {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

section {
    min-height: 80vh;
    padding: 4rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    /* Content above decorations */
}

/* Wishes Grid */
.wishes-section {
    background: rgba(255, 255, 255, 0.9);
}

.wishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
}

.wish-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 4px solid var(--primary-color);
    text-align: left;
    transition: transform 0.3s;
}

.wish-card p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
    font-style: italic;
    line-height: 1.5;
}

.wish-card .sender {
    font-weight: bold;
    color: var(--text-color);
    text-align: right;
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1513151233558-d860c5398176?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* GalleryGrid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1000px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    background: #000;
    aspect-ratio: 1/1;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Remix Button */
.remix-btn {
    background: #dfe6e9;
    color: #636e72;
    border: 1px solid #b2bec3;
    padding: 10px 20px;
    border-radius: 30px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.remix-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Music Btn */
.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.music-btn.playing {
    animation: pulse-border 2s infinite;
    background: var(--primary-color);
    color: white;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-border {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 800px) {
    .editor-panel {
        width: 100%;
        height: auto;
        max-height: 50vh;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    body.editor-mode #mainContent {
        margin-left: 0;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .recipient-name {
        font-size: 3rem;
    }
}