/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Proposal Page - Tông hồng tím nhẹ nhàng */
.proposal-page {
    background: linear-gradient(145deg, #f8e1f0 0%, #f3d4e8 30%, #ecd1e6 70%, #e5c5dc 100%);
    position: relative;
}

/* Love Page - Tông hồng nhẹ */
.love-page {
    background: linear-gradient(145deg, #ffecf0 0%, #ffe1e8 50%, #ffd6e0 100%);
}

/* Hiệu ứng nhẹ cho background */
.proposal-page::before,
.love-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 200, 220, 0.2) 0%, transparent 30%),
                radial-gradient(circle at 80% 70%, rgba(220, 180, 210, 0.2) 0%, transparent 30%),
                radial-gradient(circle at 40% 50%, rgba(230, 190, 220, 0.15) 0%, transparent 40%);
    pointer-events: none;
    opacity: 0.8;
}

/* Main Container */
.proposal-container, .love-container {
    max-width: 800px;
    width: 90%;
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
    animation: containerAppear 0.8s ease-out;
}

@keyframes containerAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.love-container {
    background: rgba(255, 255, 255, 0.85);
}

/* Date Badge */
.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: rgba(255, 230, 240, 0.8);
    border: 1px solid rgba(220, 180, 200, 0.5);
    border-radius: 50px;
    color: #b3708c;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Image */
.proposal-image {
    margin: 20px auto;
    max-width: 280px;
    animation: imageFloat 5s ease-in-out infinite;
}

@keyframes imageFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.image-frame {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: rgba(255, 240, 245, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 25px rgba(180, 130, 150, 0.2);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.heart-pulse {
    font-size: 60px;
    animation: pulse 2s ease-in-out infinite;
    color: #d88aa5;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
    }
}

/* Proposal Text */
.proposal-text {
    margin: 30px 0 20px;
}

.main-question {
    font-size: 3.2em;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: textAppear 1s ease-out;
}

@keyframes textAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.will-you {
    font-size: 0.7em;
    color: #a67c8c;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.my-valentine {
    font-family: 'Dancing Script', cursive;
    color: #c26e8c;
    font-size: 1.3em;
    text-shadow: 0 1px 5px rgba(200, 120, 140, 0.3);
}

.message {
    color: #7e6672;
    font-size: 1.1em;
    font-style: italic;
}

.message p {
    margin: 8px 0;
}

/* Buttons Container */
.buttons-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin: 35px 0 20px;
    position: relative;
    min-height: 100px;
}

/* Button Base */
.btn {
    padding: 14px 50px;
    font-size: 1.5em;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn i {
    font-size: 1.1em;
}

/* Yes Button */
.yes-btn {
    background: linear-gradient(135deg, #e8a0b0, #d88aa5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.yes-btn:hover {
    background: linear-gradient(135deg, #e08ca0, #c87694);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 25px rgba(200, 120, 140, 0.3);
}

/* No Button */
.no-btn {
    background: linear-gradient(135deg, #c0a0b0, #b0869c);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.no-btn:hover {
    background: linear-gradient(135deg, #b890a4, #a0768c);
}

.no-btn.moving {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: left, top, transform;
}

/* Đảm bảo text và icon trong button luôn theo button */
.no-btn span,
.no-btn i {
    position: relative;
    pointer-events: none;
}

/* Fun Message */
.fun-message {
    margin-top: 25px;
    color: #a67c8c;
    font-size: 1.1em;
    font-style: italic;
    padding: 12px;
    border-top: 1px dashed #dbb6c8;
    border-bottom: 1px dashed #dbb6c8;
    background: rgba(255, 240, 245, 0.3);
    border-radius: 10px;
}

/* Love Page Styles */
.celebration-header {
    margin-bottom: 25px;
}

.celebration-title {
    font-size: 2.8em;
    color: #b3708c;
    font-family: 'Dancing Script', cursive;
    animation: titlePop 0.8s ease-out;
}

@keyframes titlePop {
    0% { 
        transform: scale(0.9); 
        opacity: 0;
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
    }
}

.love-message {
    background: linear-gradient(135deg, rgba(255, 250, 250, 0.8), rgba(255, 240, 245, 0.7));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 45px 40px;
    margin: 25px 0;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow: 
        0 10px 30px rgba(220, 150, 180, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: messageSlide 0.8s ease-out;
}

.love-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 200, 220, 0.6), rgba(220, 180, 210, 0.6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-box {
    position: relative;
    z-index: 1;
}

.message-box h2 {
    color: #b3708c;
    margin-bottom: 25px;
    font-size: 2.2em;
    text-shadow: 0 2px 10px rgba(220, 150, 180, 0.2);
    font-weight: 700;
}

.message-box h2 i {
    margin: 0 12px;
    color: #d88aa5;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.message-content p {
    margin: 15px 0;
    color: #7e6672;
    font-size: 1.2em;
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: 0.3px;
    min-height: 1.8em;
}

/* Professional Typewriter Container */
.typewriter-container {
    color: #7e6672;
    font-size: 1.2em;
    line-height: 2;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-align: center;
    min-height: 150px;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#typewriterText {
    text-align: center;
    width: 100%;
}

/* Cursor Animation */
.cursor {
    display: inline;
    color: #d88aa5;
    font-weight: 700;
    animation: cursorBlink 0.8s infinite;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Simple Button */
.simple-button {
    margin: 25px 0;
}

.back-btn {
    background: rgba(200, 150, 170, 0.3);
    color: #b3708c;
    text-decoration: none;
    border: 1px solid rgba(180, 130, 150, 0.3);
    font-size: 1.1em;
    padding: 12px 35px;
    min-width: auto;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(200, 150, 170, 0.4);
    transform: translateY(-2px);
    border-color: rgba(180, 130, 150, 0.5);
    box-shadow: 0 8px 20px rgba(180, 130, 150, 0.15);
}

/* Signature */
.signature {
    margin-top: 35px;
    color: #a67c8c;
}

.signature p {
    margin: 4px 0;
}

.signature-name {
    font-family: 'Dancing Script', cursive;
    font-size: 2em;
    color: #b3708c;
    margin: 12px 0;
}

.signature-date {
    font-size: 0.95em;
    color: #a67c8c;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .main-question {
        font-size: 2.5em;
    }
    
    .btn {
        padding: 12px 40px;
        font-size: 1.3em;
        min-width: 140px;
    }
    
    .buttons-container {
        gap: 40px;
    }
    
    .celebration-title {
        font-size: 2.2em;
    }
    
    .message-box h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 30px;
        font-size: 1.2em;
        min-width: 120px;
    }
    
    .buttons-container {
        gap: 30px;
    }
    
    .main-question {
        font-size: 2em;
    }
    
    .will-you {
        font-size: 0.6em;
        letter-spacing: 1px;
    }
    
    .proposal-container, .love-container {
        padding: 25px 15px;
    }
    
    .celebration-title {
        font-size: 1.8em;
    }
    
    .love-message {
        padding: 20px;
    }
    
    .message-content p {
        font-size: 1em;
    }
    
    .typewriter-container {
        font-size: 1em;
        min-height: 120px;
    }
}

/* Music Control Button */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #e8a0b0; /* Fallback solid color */
    background: -webkit-linear-gradient(135deg, #e8a0b0, #d88aa5);
    background: -moz-linear-gradient(135deg, #e8a0b0, #d88aa5);
    background: linear-gradient(135deg, #e8a0b0, #d88aa5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(200, 120, 140, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(200, 120, 140, 0.5);
}

.music-control i {
    font-size: 1.5em;
    color: white !important;
    position: relative;
    z-index: 2;
}

/* Music Wave Animation */
.music-wave {
    position: absolute;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-control.playing .music-wave {
    opacity: 1;
}

.music-control.playing i {
    opacity: 0;
}

.music-wave span {
    width: 3px;
    height: 8px;
    background: white !important;
    border-radius: 3px;
    animation: wave 0.8s ease-in-out infinite;
}

.music-wave span:nth-child(1) {
    animation-delay: 0s;
}

.music-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.music-wave span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wave {
    0%, 100% {
        height: 8px;
    }
    50% {
        height: 20px;
    }
}

/* Responsive Music Control */
@media (max-width: 480px) {
    .music-control {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .music-control i {
        font-size: 1.2em;
    }
}