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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    background-size: cover;
    background-repeat: no-repeat;
    box-sizing: border-box;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Section Management */
.section {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    width: 100vw;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-in-out;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    background-size: cover;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.section.active {
    display: flex !important;
    min-height: 100vh !important;
    height: 100vh !important;
    opacity: 1;
    transform: translateY(0);
    z-index: 10;
    pointer-events: auto;
}

/* Countdown Section */
#countdown-section {
    background: #000 !important;
    color: #fff;
}

#countdown-section .main-title,
#countdown-section h2,
#countdown-section label {
    display: none !important;
}

#countdown-section .countdown-timer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    min-height: 100vh;
}

#countdown-section .time-unit {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#countdown-section .time-unit span {
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: none;
}

#countdown-section .time-unit label {
    font-size: 1rem;
    color: #aaa;
    margin-top: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Birthday Animation Section */
#birthday-animation {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    color: white;
}

#birthday-animation .fade-in-button {
    display: inline-block !important;
    opacity: 1 !important;
    animation: none !important;
    pointer-events: auto !important;
}

.birthday-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.spinning-cat {
    margin-bottom: 3rem;
}

.cat {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cat-face {
    position: relative;
    width: 150px;
    height: 150px;
    background: #f39c12;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
}

.cat-ears {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

.ear {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid #e67e22;
}

.ear.left {
    left: 20px;
    transform: rotate(-30deg);
}

.ear.right {
    right: 20px;
    transform: rotate(30deg);
}

.cat-eyes {
    position: absolute;
    top: 50px;
    width: 100%;
}

.eye {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #2c3e50;
    border-radius: 50%;
    top: 0;
}

.eye.left {
    left: 40px;
}

.eye.right {
    right: 40px;
}

.cat-nose {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.cat-mouth {
    position: absolute;
    width: 20px;
    height: 10px;
    border: 2px solid #2c3e50;
    border-top: none;
    border-radius: 0 0 20px 20px;
    top: 95px;
    left: 50%;
    transform: translateX(-50%);
}

.birthday-hat {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.hat-base {
    width: 80px;
    height: 20px;
    background: #e74c3c;
    border-radius: 10px;
    margin: 0 auto;
}

.hat-top {
    width: 60px;
    height: 40px;
    background: #e74c3c;
    border-radius: 30px 30px 0 0;
    margin: 0 auto;
}

.hat-pom {
    width: 15px;
    height: 15px;
    background: #f1c40f;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: 10px;
}

.birthday-cake {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 2rem auto;
}

.cake-base {
    width: 180px;
    height: 60px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-radius: 10px;
    margin: 0 auto;
    position: relative;
}

.cake-layer {
    width: 160px;
    height: 50px;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-radius: 10px;
    margin: 0 auto;
    position: relative;
    top: -10px;
}

.cake-top {
    width: 140px;
    height: 40px;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    border-radius: 10px;
    margin: 0 auto;
    position: relative;
    top: -20px;
}

.candles {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.candle {
    width: 8px;
    height: 30px;
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    border-radius: 4px;
    position: relative;
}

.candle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50% 50% 0 0;
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1); }
    100% { transform: translateX(-50%) scale(1.1); }
}

.birthday-text {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    margin-top: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: gentleBounce 4s ease-in-out infinite;
}

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

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f1c40f;
    animation: confetti-fall 3s linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Buttons */
.fade-in-button {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    animation: fadeInUp 1s ease-in-out 2s forwards;
    display: none; /* Initially hidden */
    margin: 0 !important;
}

/* Show buttons in message and poem sections */
#message-section .fade-in-button,
#poem-section .fade-in-button {
    display: inline-block !important;
    opacity: 1 !important;
    animation: none !important;
    visibility: visible !important;
}

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

.fade-in-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Message Section */
#message-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2c3e50;
}

.message-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.message-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #e74c3c;
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: left;
}

.message-text p {
    margin-bottom: 1rem;
}

/* Poem Section */
#poem-section {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #2c3e50;
    background-size: cover;
    background-repeat: no-repeat;
}

.poem-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.poem-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #e74c3c;
}

.poem-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    line-height: 2;
    text-align: center;
}

.poem-text p {
    margin-bottom: 0.5rem;
}

/* Ensure the final button is visible in poem section */
#poem-section #final-button {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    margin-top: 2rem;
    font-size: 1.2rem;
    padding: 12px 24px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: white !important;
    border: 3px solid #ff0000 !important;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 10;
    width: auto !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 50px !important;
}

#poem-section #final-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

#poem-section #final-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    .main-title {
        font-size: 2.5rem;
    }
    .birthday-content {
        padding: 0 0.5rem;
    }
    .message-content, .poem-content {
        padding: 2rem 1.2rem 2rem 1.2rem;
        margin: 1.2rem auto 1.2rem auto;
        max-width: 90vw;
        width: 700px;
        background: rgba(255,255,255,0.97);
        border-radius: 18px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 1.04rem;
        overflow-wrap: break-word;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 99vw;
        padding: 0.7rem;
    }
    .main-title {
        font-size: 2rem;
    }
    .countdown-timer {
        gap: 0.5rem;
        flex-direction: column;
    }
    .time-unit {
        padding: 0.5rem;
        min-width: 60px;
    }
    .time-unit span {
        font-size: 2rem;
    }
    .birthday-text {
        font-size: 1.3rem;
    }
    .spinning-cat img, .cat {
        width: 120px !important;
        height: 150px !important;
        max-width: 100%;
    }
    .birthday-cake {
        width: 100px;
        height: 80px;
    }
    .cake-base, .cake-layer, .cake-top {
        width: 80px !important;
        min-width: 0;
        max-width: 100%;
    }
    .candles {
        gap: 4px;
    }
    .fade-in-button {
        font-size: 1.05rem;
        padding: 10px 22px;
        margin: 2rem auto 0 auto;
    }
    .message-content, .poem-content {
        padding: 1rem 0.5rem 0.5rem 0.5rem;
        font-size: 0.98rem;
    }
    .poem-text {
        font-size: 1rem;
    }
    .message-content h2, .poem-content h2 {
        font-size: 1.1rem;
    }
    .fade-in-button {
        font-size: 0.95rem;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    .main-title {
        font-size: 1.2rem;
    }
    .birthday-content {
        padding: 0 0.2rem;
    }
    .spinning-cat img, .cat {
        width: 80px !important;
        height: 100px !important;
    }
    .birthday-cake {
        width: 60px;
        height: 50px;
    }
    .cake-base, .cake-layer, .cake-top {
        width: 50px !important;
    }
    .fade-in-button {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    .message-content, .poem-content {
        padding: 0.5rem;
        margin: 0.2rem;
        font-size: 0.95rem;
    }
    .poem-text {
        font-size: 0.95rem;
    }
    .message-content h2, .poem-content h2 {
        font-size: 1.1rem;
    }
}

/* Fade animations */
.fade-out {
    animation: fadeOut 1s ease-in-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.fade-in {
    animation: fadeIn 1s ease-in-out forwards;
}

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

/* Additional sparkle effects */
.sparkle {
    position: absolute;
    pointer-events: none;
    animation: sparkle 1s ease-out forwards;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

/* Background animation for sections */
.section.active {
    background-size: 200% 200%;
    animation: backgroundShift 10s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
} 

.message-content, .poem-content {
    width: 100%;
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 2rem 3rem;
    min-height: 300px;
    background: rgba(255,255,255,0.97);
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.08rem;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .message-content, .poem-content {
        max-width: 98vw;
        padding: 1.2rem 1rem;
    }
}
@media (max-width: 600px) {
    .message-content, .poem-content {
        max-width: 100vw;
        padding: 1rem 0.5rem;
        font-size: 0.98rem;
    }
}

#message-section, #poem-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    min-height: 100vh;
}
#poem-section {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
} 

.button-center-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.custom-btn {
  display: block;
  margin: 2.5rem auto 0 auto;
  background: #4f8cff !important;
  color: #fff !important;
  border: none;
  padding: 15px 36px;
  font-size: 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: background 0.3s, transform 0.2s;
}
.custom-btn:hover {
  background: linear-gradient(90deg, #1e5bb8 0%, #4f8cff 100%, #00c6ff 200%) !important;
  color: #fff !important;
  transform: scale(1.08);
} 

/* Birthday Photos Grid */
.birthday-photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    max-width: 600px;
    width: 100%;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.birthday-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Final Section Styles */
#final-section {
    background: #000 !important;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.final-message {
    max-width: 800px;
    padding: 2rem;
    opacity: 0;
    animation: fadeInFinal 2s ease-in-out 1s forwards;
}

.final-message h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #fff;
    font-family: 'Dancing Script', cursive;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.final-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #fff;
}

.final-text p {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInText 0.8s ease-in-out forwards;
}

.final-text p:nth-child(1) { animation-delay: 2s; }
.final-text p:nth-child(2) { animation-delay: 2.5s; }
.final-text p:nth-child(3) { animation-delay: 3s; }
.final-text p:nth-child(4) { animation-delay: 3.5s; }
.final-text p:nth-child(5) { animation-delay: 4s; }
.final-text p:nth-child(6) { animation-delay: 4.5s; }

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

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

/* Poem fade out animation */
.poem-fade-out {
    animation: poemFadeOut 2s ease-in-out forwards;
}

@keyframes poemFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Responsive design for photos */
@media (max-width: 768px) {
    .birthday-photos {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .birthday-photo {
        height: 250px;
    }
    
    .final-message h2 {
        font-size: 2rem;
    }
    
    .final-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .birthday-photos {
        max-width: 300px;
    }
    
    .birthday-photo {
        height: 200px;
    }
    
    .final-message h2 {
        font-size: 1.5rem;
    }
    
    .final-text {
        font-size: 0.9rem;
    }
} 

@keyframes fadeInFrontPage {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.frontpage-fade-in {
  animation: fadeInFrontPage 1.2s ease;
  opacity: 1 !important;
} 