﻿/* Professional Birthday Card - Blue Sky Theme */

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

body {
    font-family: "Source Sans Pro", sans-serif;
    background: linear-gradient(135deg, #e0f7ff 0%, #87CEEB 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem; 
    position: relative;
    overflow-x: hidden;
    background-attachment: fixed; /* Membuat background tetap saat scroll */
    margin: 0;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    margin-bottom: 2rem; /* Margin bawah untuk album foto */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: unset; /* Reset min-height */
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.title {
    font-family: "Playfair Display", serif;
    font-size: 3.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.highlight-text {
    color: #4682B4;
    position: relative;
    display: inline-block;
}

.highlight-text:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #87CEEB, #1E90FF);
    border-radius: 2px;
}

.subtitle {
    font-family: "Source Sans Pro", sans-serif;
    font-size: 1.2rem;
    color: #34495e;
    margin: 1rem 0;
    font-weight: 300;
}

/* Stars styling */
.stars-container {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.star {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 10px 10px, #FFD700, transparent 70%);
    position: relative;
    animation: twinkle 3s infinite alternate;
    opacity: 0.8;
}

.star:nth-child(2) {
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    animation-delay: 1s;
}

.star:nth-child(4) {
    animation-delay: 1.5s;
}

.star:nth-child(5) {
    animation-delay: 2s;
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    100% {
        opacity: 0.9;
        transform: scale(1.2);
    }
}

/* Card Styles */
.card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
    padding: 2rem;
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
}

.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Enhanced Cake Styles */
.elegant-cake {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 220px;
    margin: 3rem 0;
    perspective: 1000px;
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.15));
}

.cake-base {
    width: 220px;
    height: 140px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(5deg);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.cake-layers {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        #fffaf0 0%, 
        #f5f5dc 40%,
        #f0e8d0 100%);
    border-radius: 12px;
    transform: translateZ(0);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 -3px 8px rgba(255, 255, 255, 0.9) inset;
    overflow: hidden;
}

.cake-layers:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 35%;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(222, 184, 135, 0.7) 0%,
        rgba(210, 180, 140, 0.9) 100%);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) inset;
}

.cake-texture {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0.07) 100%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 1px, transparent 3px),
        radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.9) 1px, transparent 3px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.7) 1px, transparent 3px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.7) 1px, transparent 3px),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) 50px 30px;
    background-size: 40px 40px, 30px 30px, 35px 35px, 25px 25px, 100% 2px;
    border-radius: 12px;
    transform: translateZ(1px);
    mix-blend-mode: overlay;
}

.cake-decoration {
    position: absolute;
    width: 105%;
    height: 25px;
    top: -15px;
    left: -2.5%;
    background: linear-gradient(to right, 
        #ff9eb4, 
        #ff61a0, 
        #ff9eb4);
    border-radius: 12px 12px 0 0;
    transform: translateZ(2px);
    box-shadow: 
        0 -4px 6px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(255, 255, 255, 0.5) inset;
    overflow: hidden;
}

.cake-decoration:before,
.cake-decoration:after {
    content: "";
    position: absolute;
    height: 12px;
    width: 12px;
    background: #ffffff;
    border-radius: 50%;
    bottom: -6px;
    box-shadow: 
        0 0 3px rgba(0, 0, 0, 0.1) inset,
        0 0 5px rgba(255, 192, 203, 0.7);
}

.cake-decoration:before {
    left: 40px;
    background: radial-gradient(circle at center, #ffffff, #f0f8ff);
}

.cake-decoration:after {
    right: 40px;
    background: radial-gradient(circle at center, #ffffff, #f0f8ff);
}

/* Extra cake decorations */
.cake-decoration:after {
    box-shadow: 0 0 10px rgba(255, 182, 193, 0.8);
}

.cake-base:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 10px;
    background: rgba(222, 184, 135, 0.4);
    bottom: -10px;
    border-radius: 50%;
    filter: blur(5px);
    transform: scaleX(0.9);
}

/* candles-container dipindahkan ke candle-number.css */

.candle-elegant {
    position: relative;
    width: 10px;
    height: 45px;
    background: linear-gradient(to right, 
        #87CEEB 0%, 
        #4682B4 50%, 
        #87CEEB 100%);
    border-radius: 5px;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.candle-elegant:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 5px;
    background: #ffffff;
    top: 0;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.5));
}

.candle-elegant:nth-child(1) {
    height: 40px;
    transform: translateY(5px);
}

.candle-elegant:nth-child(3) {
    height: 50px;
    transform: translateY(-5px);
}

/* 
   candle-flame untuk lilin angka dipindahkan ke candle-number.css 
   Animasi flicker di bawah ini hanya digunakan untuk lilin konvensional jika ada
*/

@keyframes flicker {
    0%, 100% {
        transform: translateX(-50%) scale(1) rotate(-2deg);
        opacity: 0.9;
        box-shadow: 
            0 0 15px rgba(255, 215, 0, 0.8),
            0 -5px 10px rgba(255, 140, 0, 0.5);
    }
    25% {
        transform: translateX(-45%) scale(1.1) rotate(3deg);
        opacity: 1;
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.9),
            0 -7px 15px rgba(255, 140, 0, 0.7);
    }
    50% {
        transform: translateX(-53%) scale(0.9) rotate(-1deg);
        opacity: 0.8;
        box-shadow: 
            0 0 10px rgba(255, 215, 0, 0.7),
            0 -3px 8px rgba(255, 140, 0, 0.3);
    }
    75% {
        transform: translateX(-48%) scale(1.2) rotate(2deg);
        opacity: 1;
        box-shadow: 
            0 0 18px rgba(255, 215, 0, 0.9),
            0 -6px 12px rgba(255, 140, 0, 0.6);
    }
}

/* Message styles are in additional-styles.css */

/* Decorative Elements */
.decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 15px;
    height: 15px;
    animation-duration: 22s;
    opacity: 0.6;
}

.floating-element:nth-child(2) {
    top: 20%;
    left: 80%;
    width: 25px;
    height: 25px;
    animation-duration: 18s;
    animation-delay: 1s;
    opacity: 0.4;
}

.floating-element:nth-child(3) {
    top: 80%;
    left: 15%;
    width: 20px;
    height: 20px;
    animation-duration: 25s;
    animation-delay: 2s;
    opacity: 0.5;
}

.floating-element:nth-child(4) {
    top: 60%;
    left: 90%;
    width: 18px;
    height: 18px;
    animation-duration: 23s;
    animation-delay: 0.5s;
    opacity: 0.7;
}

.floating-element:nth-child(5) {
    top: 30%;
    left: 40%;
    width: 22px;
    height: 22px;
    animation-duration: 21s;
    animation-delay: 1.5s;
    opacity: 0.5;
}

.floating-element:nth-child(6) {
    top: 70%;
    left: 65%;
    width: 16px;
    height: 16px;
    animation-duration: 19s;
    animation-delay: 2.5s;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-50px) rotate(90deg);
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
    }
    75% {
        transform: translateY(-50px) rotate(270deg);
    }
}

/* Balloon styling */
.balloon {
    position: fixed;
    bottom: -60px;
    width: 40px;
    height: 50px;
    background: linear-gradient(135deg, #87CEEB 0%, #ffffff 100%);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.8);
    animation: balloon-float 15s infinite ease-in-out;
}

.balloon:nth-child(1) {
    left: 10%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.balloon:nth-child(2) {
    left: 50%;
    animation-duration: 16s;
    animation-delay: 5s;
    background: linear-gradient(135deg, #4682B4 0%, #d7f0ff 100%);
}

.balloon:nth-child(3) {
    left: 80%;
    animation-duration: 20s;
    animation-delay: 7s;
    background: linear-gradient(135deg, #1E90FF 0%, #c7e5ff 100%);
}

@keyframes balloon-float {
    0% {
        transform: translateY(0) rotate(-5deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(-400px) rotate(5deg);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-800px) rotate(-5deg);
        opacity: 0;
    }
}

/* Sparkle styling */
.sparkle {
    position: fixed;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px #87CEEB, 0 0 20px rgba(135, 206, 235, 0.5);
    animation: sparkle-fade 5s infinite;
}

.sparkle:nth-child(1) {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 30%;
    left: 70%;
    animation-delay: 1s;
}

.sparkle:nth-child(3) {
    top: 70%;
    left: 30%;
    animation-delay: 2s;
}

@keyframes sparkle-fade {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.2) 1px, transparent 2px),
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 1px, transparent 2px),
        radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.2) 1px, transparent 2px),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.2) 1px, transparent 2px);
    background-size: 100px 100px;
}

/* Control section */
.controls {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Gift box styling */
.gift-wrapper {
    margin: 2rem auto;
    max-width: 150px;
    perspective: 1000px;
}

.gift-box {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    transform-style: preserve-3d;
    animation: gift-rotate 15s infinite ease-in-out;
}

.gift-lid {
    position: absolute;
    width: 110px;
    height: 20px;
    background: #4682B4;
    top: -22px;
    left: -5px;
    border-radius: 4px;
    transform-origin: bottom;
    transform: rotateX(0deg);
    transition: transform 1s;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.gift-box:hover .gift-lid {
    transform: rotateX(-80deg);
}

.gift-body {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 100%);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gift-ribbon {
    position: absolute;
    width: 20px;
    height: 100px;
    background: #FF1493;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.gift-bow {
    position: absolute;
    width: 40px;
    height: 20px;
    background: #FF1493;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 0 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.gift-bow:before,
.gift-bow:after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    background: #FF1493;
    border-radius: 50%;
    top: -5px;
}

.gift-bow:before {
    left: -5px;
}

.gift-bow:after {
    right: -5px;
}

@keyframes gift-rotate {
    0%, 100% {
        transform: rotateY(0) translateY(0);
    }
    25% {
        transform: rotateY(10deg) translateY(-5px);
    }
    50% {
        transform: rotateY(0) translateY(-10px);
    }
    75% {
        transform: rotateY(-10deg) translateY(-5px);
    }
}

/* Message input styling */
.message-input-container {
    margin: 1.5rem 0;
}

.birthday-message-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #87CEEB;
    border-radius: 10px;
    font-family: "Source Sans Pro", sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.birthday-message-input:focus {
    outline: none;
    border-color: #4682B4;
    box-shadow: 0 0 10px rgba(70, 130, 180, 0.3);
}

/* Action section */
.action-section {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .cake-base {
        width: 150px;
        height: 90px;
    }
    
    .candles-container {
        gap: 15px;
    }
    
    .gift-box {
        width: 80px;
        height: 80px;
    }
    
    .gift-lid {
        width: 90px;
    }
    
    .gift-body {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
        min-height: 100vh;
        justify-content: flex-start;
    }
    
    .container {
        margin-top: 1rem;
    }
    
    .title {
        font-size: 2rem;
        margin-bottom: 0.2rem;
    }
    
    .recipient-name {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .cake-base {
        width: 120px;
        height: 70px;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .candles-container {
        gap: 10px;
    }
    
    .message-section {
        margin-top: 1rem;
    }
    
    .main-message {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .sub-message {
        font-size: 0.9rem;
    }
    
    .action-section {
        margin-top: 1.5rem;
    }
    
    .control-btn, .elegant-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}
