@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #ffd700;
    --light: #f5f7fa;
    --dark: #333;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark);
    overflow-x: hidden;
}

/* ==================== LANDING PAGE ==================== */
.landing-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px 16px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.landing-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.6rem, 6vw, 3.5rem);
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    animation: bounce 2s infinite;
    line-height: 1.3;
}

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

.countdown-timer {
    display: flex;
    gap: clamp(4px, 2vw, 20px);
    justify-content: center;
    flex-wrap: nowrap;
    margin: 30px 0;
    align-items: center;
}

.timer-unit {
    background: rgba(255,255,255,0.2);
    padding: clamp(10px, 3vw, 30px) clamp(8px, 2.5vw, 40px);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    animation: slideIn 0.8s ease-out;
    flex: 1;
    min-width: 0;
    max-width: 110px;
}

.timer-value {
    display: block;
    font-size: clamp(1.8rem, 7vw, 4rem);
    font-weight: 800;
    color: white;
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.timer-label {
    color: rgba(255,255,255,0.9);
    margin-top: 5px;
    font-size: clamp(0.6rem, 2vw, 1rem);
    font-weight: 600;
}

.timer-separator {
    color: white;
    font-size: clamp(1.4rem, 5vw, 3rem);
    font-weight: bold;
    animation: blink 1s infinite;
    flex-shrink: 0;
}

@keyframes blink {
    0%, 49%, 100% { opacity: 1; }
    50%, 99% { opacity: 0; }
}

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

.landing-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-top: 20px;
    animation: fadeIn 1.5s ease-out;
}

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

.redirect-container {
    margin-top: 40px;
    animation: popIn 0.6s ease-out;
    padding: 0 10px;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.celebration-text {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: white;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

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

.redirect-button {
    display: inline-block;
    padding: clamp(14px, 3vw, 18px) clamp(28px, 6vw, 50px);
    background: white;
    color: var(--secondary);
    text-decoration: none;
    border-radius: 50px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 340px;
    width: 90%;
}

.redirect-button:hover, .redirect-button:active {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* Floating Balloons */
.floating-balloon {
    position: absolute;
    width: 40px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #ff6b9d, #e84a5f);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    animation: float 20s infinite ease-in;
    pointer-events: none;
}

.floating-balloon:nth-child(2) {
    left: 10%;
    animation-delay: 2s;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ffed4e);
}

.floating-balloon:nth-child(3) {
    right: 8%;
    animation-delay: 4s;
    background: radial-gradient(circle at 30% 30%, #667eea, #5568d3);
}

@keyframes float {
    0% { bottom: -100px; opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { bottom: 120vh; opacity: 0; transform: rotate(-45deg) translateX(100px); }
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 12px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-title {
    color: white;
    font-size: clamp(0.95rem, 3.5vw, 1.5rem);
    flex: 1;
    word-break: break-word;
    line-height: 1.3;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 16px;
    border: 2px solid white;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    min-height: 44px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-link:hover, .nav-link:active {
    background: white;
    color: var(--secondary);
}

/* ==================== DASHBOARD PAGE ==================== */
/* ==================== DASHBOARD PAGE ==================== */
.dashboard-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 50px;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 5vw, 40px) 16px;
}

.dashboard-title {
    text-align: center;
    color: white;
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.6rem, 6vw, 3rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.3;
}

.dashboard-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: clamp(0.95rem, 3vw, 1.2rem);
    margin-bottom: 30px;
}

/* ==================== SECTIONS GRID ==================== */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(14px, 3vw, 28px);
    margin-top: 20px;
}

/* Make it 3 columns on larger tablets and 4 on desktop */
@media (min-width: 600px) {
    .sections-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .sections-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== SECTION CARDS ==================== */
.section-card {
    background: rgba(255,255,255,0.97);
    border-radius: 18px;
    padding: clamp(16px, 4vw, 30px) clamp(12px, 3vw, 30px);
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.section-card:hover::before { 
    left: 100%; 
}

.section-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 50px rgba(0,0,0,0.3); 
}

.section-card:active { 
    transform: scale(0.97); 
}

.section-icon { 
    font-size: clamp(2.2rem, 7vw, 4rem); 
    margin-bottom: 12px; 
}

.section-card h3 {
    font-size: clamp(0.95rem, 3.2vw, 1.45rem);
    color: var(--secondary);
    margin-bottom: 6px;
    font-weight: 700;
}

.section-card p {
    color: #666;
    margin-bottom: 8px;
    font-size: clamp(0.75rem, 2.2vw, 1rem);
    display: none;
}

.card-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.85rem;
    margin-top: 6px;
}

.section-card:hover .card-hover { 
    opacity: 1; 
}

/* ==================== FULL WIDTH SPECIAL SURPRISES CARD ==================== */
.section-card.full-width {
    grid-column: 1 / -1;           /* Spans full width */
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    padding: clamp(20px, 4vw, 32px) clamp(20px, 5vw, 40px);
    min-height: 140px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%); /* Special pinkish look */
    color: white;
}

.section-card.full-width .section-icon {
    font-size: clamp(2.8rem, 8vw, 4.2rem);
    margin-bottom: 0;
}

.section-card.full-width h3 {
    color: white;
    font-size: clamp(1.25rem, 4vw, 1.8rem);
    margin-bottom: 4px;
}

.section-card.full-width p {
    color: rgba(255,255,255,0.9);
    display: block;
    font-size: clamp(0.9rem, 2.6vw, 1.1rem);
}

.section-card.full-width:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.35);
}

/* Extra touch for mobile */
@media (max-width: 599px) {
    .section-card.full-width {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ==================== PAGE BACKGROUNDS ==================== */
.gallery-page,
.wishes-page,
.games-page,
.messages-page,
.videos-page,
.playlist-page,
.surprises-page {
    background: linear-gradient(135deg, var(--light) 0%, white 100%);
    min-height: 100vh;
}

.gallery-container,
.wishes-container,
.games-container,
.messages-container,
.videos-container,
.playlist-container,
.surprises-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 5vw, 40px) 16px;
    min-height: calc(100vh - 70px);
}

h1 {
    text-align: center;
    color: var(--secondary);
    font-size: clamp(1.4rem, 5vw, 2.5rem);
    margin-bottom: clamp(20px, 5vw, 40px);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1.3;
}

/* ==================== GALLERY ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 2vw, 20px);
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover, .gallery-item:active {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: clamp(140px, 22vw, 250px);
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
}

.gallery-item:hover .gallery-caption { opacity: 1; }

/* ==================== WISHES ==================== */
.add-wish-section {
    background: white;
    padding: clamp(16px, 4vw, 30px);
    border-radius: 15px;
    margin-bottom: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.add-wish-section h3 {
    color: var(--secondary);
    margin-bottom: 12px;
    font-size: clamp(1rem, 3vw, 1.3rem);
}

.wish-input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

#wishInput {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-size: 16px; /* prevents iOS zoom */
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#wishInput:focus {
    outline: none;
    border-color: var(--secondary);
}

.add-wish-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    min-height: 48px;
    width: 100%;
}

.add-wish-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102,126,234,0.4); }
.add-wish-btn:active { transform: scale(0.97); }

.wishes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(12px, 3vw, 20px);
}

.wish-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: clamp(14px, 3vw, 24px);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideInWish 0.6s ease-out;
}

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

.wish-card p {
    color: var(--dark);
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.wish-author {
    display: block;
    color: var(--secondary);
    font-weight: 700;
    text-align: right;
    font-size: 0.9rem;
}

/* ==================== MESSAGES ==================== */
.messages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(14px, 3vw, 25px);
}

.message-card {
    background: white;
    padding: clamp(16px, 4vw, 30px);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-left: 5px solid var(--secondary);
    transition: all 0.3s ease;
}

.message-card:hover, .message-card:active {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.message-card h3 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.message-card p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.message-from {
    display: block;
    color: var(--primary);
    font-weight: 700;
    text-align: right;
    font-size: 0.9rem;
}

/* ==================== GAMES ==================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 2.5vw, 20px);
}

.game-card {
    background: white;
    padding: clamp(10px, 2.5vw, 20px);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    user-select: none;
}

.game-card:hover { transform: scale(1.06); box-shadow: 0 8px 25px rgba(0,0,0,0.2); background: linear-gradient(135deg, var(--light) 0%, white 100%); }
.game-card:active { transform: scale(0.94); }

.game-icon { font-size: clamp(1.6rem, 4vw, 3rem); margin-bottom: 6px; }

.game-card h3 {
    color: var(--secondary);
    margin-bottom: 4px;
    font-size: clamp(0.75rem, 2vw, 1rem);
    line-height: 1.2;
}

.game-card p {
    color: #666;
    font-size: clamp(0.65rem, 1.6vw, 0.9rem);
    display: none;
}

/* ==================== VIDEOS ==================== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 3vw, 20px);
}

.video-card { text-align: center; }

.video-placeholder {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.8rem, 4vw, 3rem);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    gap: 6px;
}

.video-placeholder p { font-size: clamp(0.75rem, 2vw, 1rem); }
.video-placeholder:hover, .video-placeholder:active { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

.video-title {
    margin-top: 8px;
    color: var(--secondary);
    font-weight: 700;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.video-note {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
}

/* ==================== PLAYLIST ==================== */
.player-section {
    background: white;
    padding: clamp(14px, 3vw, 20px);
    border-radius: 14px;
    margin: 16px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#playlistAudio {
    width: 100%;
    border-radius: 8px;
    min-height: 48px;
}

.playlist {
    background: white;
    padding: clamp(16px, 4vw, 30px);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.playlist h3 {
    color: var(--secondary);
    margin-bottom: 14px;
    font-size: clamp(1rem, 3vw, 1.3rem);
}

.playlist-items { display: grid; gap: 8px; }

.playlist-item {
    padding: clamp(12px, 3vw, 15px) 16px;
    background: var(--light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    min-height: 48px;
    display: flex;
    align-items: center;
}

.playlist-item:hover, .playlist-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: translateX(6px);
}

/* ==================== SURPRISES ==================== */
.surprise-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 3vw, 20px);
}

.surprise-box {
    background: linear-gradient(135deg, #FFD89B 0%, #FF9A56 100%);
    padding: clamp(18px, 4vw, 30px);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    min-height: clamp(140px, 25vw, 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.surprise-box:hover { transform: scale(1.04); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.surprise-box:active { transform: scale(0.97); }

.box-icon { font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 10px; }

.surprise-box p {
    color: white;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.surprise-content {
    color: white;
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    line-height: 1.6;
}

/* ==================== CONFETTI ==================== */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
    border-radius: 2px;
}

@keyframes confetti-fall {
    to { transform: translateY(100vh) rotateZ(360deg); opacity: 0; }
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
    padding: clamp(20px, 4vw, 30px) 16px;
    margin-top: 40px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

@media (min-width: 600px) {
    .modal { align-items: center; padding: 16px; }
}

.modal-content {
    background-color: white;
    padding: clamp(24px, 5vw, 40px);
    border-radius: 20px 20px 0 0;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 -10px 50px rgba(0,0,0,0.3);
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 600px) {
    .modal-content {
        border-radius: 20px;
        box-shadow: 0 10px 50px rgba(0,0,0,0.3);
        max-height: 85vh;
    }
}

.close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 2em;
    cursor: pointer;
    color: var(--secondary);
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ==================== TABLET & DESKTOP ==================== */
@media (min-width: 600px) {
    .sections-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .section-card p { display: block; }
    .game-card p { display: block; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .wish-input-area { flex-direction: row; }
    .add-wish-btn { width: auto; white-space: nowrap; }
    .wishes-grid { grid-template-columns: repeat(2, 1fr); }
    .messages-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (min-width: 900px) {
    .sections-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .wishes-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Stars placeholder */
.stars {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}
