/* =====================================
   Birthday Website for Kinoah
   Design: Vibrant & Festive Celebration Theme
   ===================================== */

/* CSS Variables */
:root {
    --color-primary: #FFD700;
    --color-primary-light: #FFEC8B;
    --color-primary-dark: #DAA520;
    --color-secondary: #FF6B6B;
    --color-accent: #FF8C00;
    --color-pink: #FF69B4;
    --color-purple: #9B59B6;
    --color-white: #FFFFFF;
    --color-cream: #FFFAF0;
    --color-text: #333333;
    --color-text-light: #666666;
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    --gradient-celebration: linear-gradient(135deg, #FFD700 0%, #FF8C00 25%, #FF6B6B 50%, #FF8C00 75%, #FFD700 100%);
    --gradient-rainbow: linear-gradient(90deg, #FF6B6B, #FFD700, #4ECDC4, #45B7D1, #96C93D, #FF6B6B);
    --gradient-hero: linear-gradient(180deg, #FFF4E6 0%, #FFE4B5 30%, #FFFAF0 70%, #FFFFFF 100%);
    --gradient-festive: linear-gradient(135deg, #FFE4B5 0%, #FFFACD 50%, #FFE4E1 100%);
    --shadow-soft: 0 4px 20px rgba(255, 215, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(255, 215, 0, 0.6);
    --shadow-rainbow: 0 0 30px rgba(255, 107, 107, 0.3), 0 0 60px rgba(255, 215, 0, 0.2);
    --font-main: 'M PLUS Rounded 1c', sans-serif;
    --border-radius: 25px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(180deg, #FFF4E6 0%, #FFFAF0 50%, #FFF8DC 100%);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Floating Decorations */
.floating-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.balloon {
    position: absolute;
    font-size: 3rem;
    animation: balloon-float 8s ease-in-out infinite;
}

.balloon-1 {
    left: 5%;
    animation-delay: 0s;
}

.balloon-2 {
    left: 15%;
    animation-delay: 1s;
}

.balloon-3 {
    right: 5%;
    animation-delay: 2s;
}

.balloon-4 {
    right: 15%;
    animation-delay: 3s;
}

.balloon-5 {
    left: 50%;
    animation-delay: 4s;
}

@keyframes balloon-float {

    0%,
    100% {
        transform: translateY(100vh) rotate(-5deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(5deg);
        opacity: 0;
    }
}

.star {
    position: absolute;
    font-size: 2rem;
    animation: star-twinkle 3s ease-in-out infinite;
}

.star-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 40%;
    right: 10%;
    animation-delay: 1s;
}

.star-3 {
    top: 60%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes star-twinkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
}

/* BGM Control */
.bgm-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 240, 0.95) 100%);
    padding: 12px 18px;
    border-radius: 50px;
    box-shadow: var(--shadow-rainbow);
    border: 4px solid var(--color-primary);
    backdrop-filter: blur(10px);
}

.bgm-toggle {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--gradient-gold);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.bgm-toggle:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: var(--shadow-glow);
}

.volume-slider {
    width: 80px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--color-primary) 50%, #E0E0E0 50%);
    border-radius: 4px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gradient-gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.volume-label {
    font-size: 13px;
    font-weight: 900;
    color: var(--color-primary-dark);
    min-width: 40px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 90% 30%, rgba(255, 107, 107, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(255, 140, 0, 0.2) 0%, transparent 40%);
    pointer-events: none;
    animation: hero-glow 5s ease-in-out infinite alternate;
}

@keyframes hero-glow {
    0% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0.9;
    animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.celebration-banner {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--gradient-rainbow);
    background-size: 300% 100%;
    padding: 15px 40px;
    border-radius: 50px;
    margin-bottom: 30px;
    animation: rainbow-shift 3s linear infinite;
    box-shadow: var(--shadow-rainbow);
}

@keyframes rainbow-shift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

.banner-icon {
    font-size: 2rem;
    animation: bounce 1s ease-in-out infinite;
}

.banner-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
}

.hero-title {
    margin-bottom: 30px;
}

.name-main {
    display: block;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    background: var(--gradient-celebration);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    filter: drop-shadow(3px 3px 6px rgba(255, 140, 0, 0.4));
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.name-sub {
    display: block;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-accent);
    margin-top: 10px;
    text-shadow: 2px 2px 4px rgba(255, 140, 0, 0.3);
}

.age-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    background: var(--gradient-gold);
    padding: 20px 50px;
    border-radius: 60px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glow), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    animation: bounce 2s ease-in-out infinite, glow-pulse 1.5s ease-in-out infinite alternate;
    border: 4px solid white;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes glow-pulse {
    0% {
        box-shadow: var(--shadow-glow);
    }

    100% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.8);
    }
}

.age-prefix {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--color-white);
}

.age-number {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--color-white);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.age-unit {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--color-white);
}

.hero-message {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    color: var(--color-text);
    font-weight: 900;
    margin-bottom: 20px;
}

.sparkle-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 2rem;
}

.sparkle-row span {
    animation: sparkle 1.5s ease-in-out infinite;
}

.sparkle-row span:nth-child(1) {
    animation-delay: 0s;
}

.sparkle-row span:nth-child(2) {
    animation-delay: 0.2s;
}

.sparkle-row span:nth-child(3) {
    animation-delay: 0.4s;
}

.sparkle-row span:nth-child(4) {
    animation-delay: 0.6s;
}

.sparkle-row span:nth-child(5) {
    animation-delay: 0.8s;
}

.hero-image-container {
    position: relative;
    margin-top: 50px;
    z-index: 1;
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

.hero-image {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 10px solid var(--color-primary);
    box-shadow: var(--shadow-glow), 0 0 0 5px white;
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.sparkle {
    position: absolute;
    font-size: 2.5rem;
    animation: sparkle 1.5s ease-in-out infinite;
    z-index: 2;
}

.sparkle-1 {
    top: -30px;
    right: -30px;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 50%;
    left: -40px;
    animation-delay: 0.3s;
}

.sparkle-3 {
    bottom: -20px;
    right: -35px;
    animation-delay: 0.6s;
}

.sparkle-4 {
    bottom: 30%;
    left: -35px;
    animation-delay: 0.9s;
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.4) rotate(180deg);
        opacity: 0.7;
    }
}

/* Section Styles */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 50px;
    color: var(--color-primary-dark);
    position: relative;
}

.title-icon {
    font-size: 3rem;
    animation: bounce 1.5s ease-in-out infinite;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 6px;
    background: var(--gradient-rainbow);
    background-size: 300% 100%;
    border-radius: 3px;
    animation: rainbow-shift 3s linear infinite;
}

/* Profile Section */
.profile-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-cream) 100%);
    position: relative;
}

.profile-section::before {
    content: '🎉';
    position: absolute;
    top: 50px;
    left: 10%;
    font-size: 4rem;
    opacity: 0.2;
    animation: float 4s ease-in-out infinite;
}

.profile-section::after {
    content: '🎊';
    position: absolute;
    bottom: 50px;
    right: 10%;
    font-size: 4rem;
    opacity: 0.2;
    animation: float 4s ease-in-out infinite reverse;
}

.profile-card {
    background: linear-gradient(135deg, #FFFAF0 0%, #FFE4B5 100%);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow-rainbow);
    border: 5px solid var(--color-primary);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--gradient-rainbow);
    background-size: 300% 100%;
    animation: rainbow-shift 3s linear infinite;
}

.profile-name {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-primary-dark);
}

/* Message Section */
.message-section {
    padding: 100px 0;
    background: var(--gradient-festive);
    position: relative;
}

.message-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 60px;
    box-shadow: var(--shadow-rainbow);
    border: 5px solid var(--color-primary);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '🎂';
    position: absolute;
    top: -30px;
    left: -30px;
    font-size: 100px;
    opacity: 0.1;
}

.message-card::after {
    content: '🎁';
    position: absolute;
    bottom: -30px;
    right: -30px;
    font-size: 100px;
    opacity: 0.1;
}

.message-text {
    font-size: 1.6rem;
    line-height: 2.3;
    color: var(--color-text);
    position: relative;
    z-index: 1;
}

.highlight {
    display: inline-block;
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-rainbow);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-shift 3s linear infinite;
    margin-top: 25px;
}

/* Friends Messages Section */
.friends-messages-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--color-white) 0%, #FFF4E6 50%, var(--color-cream) 100%);
}

.message-cards-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.friend-message-card {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, #FFFAF0 0%, #FFFFFF 50%, #FFF8DC 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.2);
    border: 4px solid var(--color-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.friend-message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: var(--gradient-gold);
}

.friend-message-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-rainbow);
    border-color: var(--color-accent);
}

.friend-avatar {
    flex-shrink: 0;
}

.friend-avatar img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: var(--transition);
}

.friend-message-card:hover .friend-avatar img {
    transform: rotate(5deg) scale(1.05);
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.friend-message-content {
    font-size: 1.4rem;
    line-height: 2;
    color: var(--color-text);
}

/* Footer */
.footer {
    background: var(--gradient-rainbow);
    background-size: 300% 100%;
    animation: rainbow-shift 5s linear infinite;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
}

.footer-celebration {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.footer-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-white);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    position: relative;
}

.footer-sub {
    font-size: 1.2rem;
    color: var(--color-white);
    opacity: 0.95;
    margin-bottom: 25px;
    position: relative;
}

.footer-balloons {
    font-size: 2.5rem;
    animation: float 2s ease-in-out infinite;
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .bgm-control {
        top: 10px;
        right: 10px;
        padding: 10px 14px;
    }

    .volume-slider {
        width: 60px;
    }

    .hero {
        padding: 80px 15px 50px;
    }

    .hero-image {
        width: 220px;
        height: 220px;
    }

    .image-glow {
        width: 260px;
        height: 260px;
    }

    .celebration-banner {
        padding: 10px 25px;
    }

    .banner-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .profile-card,
    .message-card {
        padding: 35px 25px;
    }

    .friend-message-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px;
    }

    .friend-message-card::before {
        width: 100%;
        height: 8px;
        left: 0;
        top: 0;
    }

    .friend-avatar img {
        width: 80px;
        height: 80px;
    }

    .friend-name {
        justify-content: center;
    }

    .floating-decorations .balloon {
        font-size: 2rem;
    }
}

/* Animation on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Words for Message Section */
.floating-words {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.word {
    position: absolute;
    font-weight: 900;
    color: var(--color-primary);
    opacity: 0.15;
    animation: float-word 10s ease-in-out infinite;
}

.word-1 {
    top: 10%;
    left: 5%;
    font-size: 3rem;
    animation-delay: 0s;
}

.word-2 {
    top: 30%;
    right: 8%;
    font-size: 2.5rem;
    animation-delay: 1s;
    color: var(--color-secondary);
}

.word-3 {
    bottom: 20%;
    left: 10%;
    font-size: 5rem;
    animation-delay: 2s;
}

.word-4 {
    top: 50%;
    left: 3%;
    font-size: 4rem;
    animation-delay: 3s;
}

.word-5 {
    bottom: 35%;
    right: 5%;
    font-size: 2rem;
    animation-delay: 4s;
    color: var(--color-accent);
}

.word-6 {
    top: 70%;
    right: 10%;
    font-size: 4.5rem;
    animation-delay: 5s;
}

@keyframes float-word {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

/* Background Decorations for Friends Messages Section */
.bg-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-emoji {
    position: absolute;
    font-size: 4rem;
    opacity: 0.12;
    animation: float-emoji 12s ease-in-out infinite;
}

.bg-1 {
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.bg-2 {
    top: 15%;
    right: 8%;
    animation-delay: 1s;
}

.bg-3 {
    top: 30%;
    left: 3%;
    animation-delay: 2s;
}

.bg-4 {
    top: 45%;
    right: 5%;
    animation-delay: 3s;
}

.bg-5 {
    top: 55%;
    left: 8%;
    animation-delay: 4s;
}

.bg-6 {
    top: 70%;
    right: 3%;
    animation-delay: 5s;
}

.bg-7 {
    top: 85%;
    left: 5%;
    animation-delay: 6s;
}

.bg-8 {
    top: 95%;
    right: 8%;
    animation-delay: 7s;
}

@keyframes float-emoji {

    0%,
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) scale(1.1) rotate(5deg);
    }

    50% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    75% {
        transform: translateY(10px) scale(0.95) rotate(-5deg);
    }
}

.bg-text {
    position: absolute;
    font-size: 3.5rem;
    font-weight: 900;
    opacity: 0.08;
    color: var(--color-primary-dark);
    animation: float-text 15s ease-in-out infinite;
}

.bg-text-1 {
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.bg-text-2 {
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.bg-text-3 {
    top: 80%;
    left: 15%;
    animation-delay: 4s;
}

@keyframes float-text {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
        opacity: 0.08;
    }

    50% {
        transform: translateY(-25px) rotate(2deg);
        opacity: 0.12;
    }
}