:root {
    --primary-pink: #ff6b9d;
    --secondary-pink: #ff8fab;
    --deep-rose: #c9184a;
    --light-pink: #ffccd5;
    --blush: #fff0f3;
    --hot-pink: #ff006e;
    --lavender: #e0aaff;
    --soft-purple: #c77dff;
    --white: #ffffff;
    --gradient-love: linear-gradient(135deg, #ff6b9d 0%, #c9184a 50%, #ff006e 100%);
    --gradient-soft: linear-gradient(135deg, #ffccd5 0%, #ff8fab 100%);
    --gradient-dream: linear-gradient(135deg, #ff6b9d 0%, #e0aaff 50%, #c77dff 100%);
    --shadow-glow: 0 0 30px rgba(255, 107, 157, 0.5);
    --shadow-soft: 0 10px 40px rgba(255, 107, 157, 0.3);
    --font-romantic: 'Dancing Script', cursive;
    --font-modern: 'Quicksand', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-modern);
    background: linear-gradient(135deg, #1a0011 0%, #2d0a1f 50%, #1a0011 100%);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">💕</text></svg>'), auto;
}

/* Password Screen */
#password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0011 0%, #2d0a1f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#password-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.password-container {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 107, 157, 0.3);
    box-shadow: var(--shadow-soft);
    max-width: 400px;
    width: 90%;
    animation: floatIn 1s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.password-heart {
    font-size: 4rem;
    animation: heartbeat 1.5s ease-in-out infinite;
    margin-bottom: 1rem;
}

.password-title {
    font-family: var(--font-romantic);
    font-size: 2rem;
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.password-input-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

#password-input {
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    border: 2px solid rgba(255, 107, 157, 0.5);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-align: center;
    width: 180px;
    letter-spacing: 0.5rem;
    transition: all 0.3s ease;
}

#password-input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
}

#password-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1rem;
    font-size: 1rem;
}

#password-submit {
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    border: none;
    border-radius: 50%;
    background: var(--gradient-love);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

#password-submit:hover {
    transform: scale(1.1);
}

.password-error {
    color: #ff4757;
    font-size: 1rem;
    min-height: 1.5rem;
    font-weight: 600;
}

.password-error.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}

/* Secret Popup */
.secret-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.secret-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.secret-popup-content {
    background: linear-gradient(135deg, #2d0a1f 0%, #1a0011 100%);
    padding: 2.5rem;
    border-radius: 30px;
    text-align: center;
    border: 2px solid var(--primary-pink);
    box-shadow: var(--shadow-glow);
    max-width: 350px;
    width: 90%;
    position: relative;
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.secret-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--light-pink);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secret-popup-close:hover {
    color: var(--white);
    transform: scale(1.2);
}

.secret-popup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.secret-popup-text {
    color: var(--light-pink);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.secret-popup-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-family: var(--font-modern);
    font-weight: 600;
    border: none;
    border-radius: 50px;
    background: var(--gradient-love);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.secret-popup-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.secret-hint-text {
    color: var(--secondary-pink);
    font-size: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.secret-hint-text.hidden {
    display: none;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0011 0%, #2d0a1f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.heart-loader {
    font-size: 5rem;
    animation: heartbeat 1s ease-in-out infinite;
}

#preloader p {
    color: var(--light-pink);
    font-size: 1.2rem;
    margin-top: 1rem;
    font-family: var(--font-romantic);
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* Canvas & Trail */
#love-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#heart-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.trail-heart {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
    animation: floatUp 2s ease-out forwards;
    opacity: 0;
    z-index: 1;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5) rotate(45deg);
    }
}

#sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.sparkle {
    position: absolute;
    pointer-events: none;
    animation: sparkle 0.6s ease-out forwards;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

/* Main Content */
#main-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: none;
}

#main-content.visible {
    display: block;
}

/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.names-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.name-wrapper {
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    touch-action: none;
}

.name-wrapper:active {
    cursor: grabbing;
}

.name-wrapper.dragging {
    opacity: 0.8;
    transform: scale(1.1) rotate(5deg);
    z-index: 1000;
}

.name {
    font-family: var(--font-romantic);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    text-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    pointer-events: none;
}

.name-hande {
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.name-altar {
    background: var(--gradient-dream);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.name-wrapper:hover .name {
    transform: scale(1.1) rotate(-3deg);
    filter: brightness(1.2);
}

.heart-connector {
    animation: pulse 2s ease-in-out infinite;
}

.heart-icon {
    font-size: clamp(2rem, 5vw, 3rem);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Counter */
.counter-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 107, 157, 0.3);
    box-shadow: var(--shadow-soft);
    max-width: 800px;
    width: 90%;
}

.counter-title {
    font-family: var(--font-romantic);
    color: var(--light-pink);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.counter-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.counter-item {
    background: var(--gradient-love);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    min-width: 80px;
    box-shadow: var(--shadow-glow);
    transition: transform 0.3s ease;
}

.counter-item:hover {
    transform: translateY(-5px) scale(1.05);
}

.counter-value {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    transition: transform 0.2s ease;
}

.counter-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rotating-date {
    color: var(--secondary-pink);
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-family: var(--font-romantic);
    transition: all 0.3s ease;
    min-height: 2rem;
}

/* Love Messages */
#love-messages {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.love-section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.section-title {
    font-family: var(--font-romantic);
    font-size: clamp(2.5rem, 8vw, 5rem);
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(255, 107, 157, 0.8));
    }
}

.title-heart {
    animation: heartFloat 2s ease-in-out infinite;
}

.title-heart:last-child {
    animation-delay: 0.5s;
}

@keyframes heartFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

.love-subtitle {
    color: var(--light-pink);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.8;
    font-style: italic;
}

.love-carousel {
    width: 100%;
    max-width: 1200px;
    overflow: visible;
    padding: 2rem 0;
}

.love-bubble-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    perspective: 1000px;
}

.love-bubble {
    background: var(--gradient-soft);
    padding: 1.2rem 2rem;
    border-radius: 50px;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--deep-rose);
    cursor: grab;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.3);
    user-select: none;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    touch-action: none;
    font-weight: 600;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.love-bubble::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.love-bubble:hover::before {
    opacity: 1;
}

.love-bubble:hover {
    transform: translateY(-10px) scale(1.1) rotateY(10deg);
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.5);
    border-color: var(--white);
}

.love-bubble:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.love-bubble.dragging {
    opacity: 0.9;
    z-index: 1000;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 30px 80px rgba(255, 107, 157, 0.6);
}

.love-bubble .lang-flag {
    margin-left: 0.5rem;
    font-size: 1.2em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.love-bubble:nth-child(1) {
    animation-delay: 0.1s;
}

.love-bubble:nth-child(2) {
    animation-delay: 0.15s;
}

.love-bubble:nth-child(3) {
    animation-delay: 0.2s;
}

.love-bubble:nth-child(4) {
    animation-delay: 0.25s;
}

.love-bubble:nth-child(5) {
    animation-delay: 0.3s;
}

.love-bubble:nth-child(6) {
    animation-delay: 0.35s;
}

.love-bubble:nth-child(7) {
    animation-delay: 0.4s;
}

.love-bubble:nth-child(8) {
    animation-delay: 0.45s;
}

.love-bubble:nth-child(9) {
    animation-delay: 0.5s;
}

.love-bubble:nth-child(10) {
    animation-delay: 0.55s;
}

.love-bubble:nth-child(11) {
    animation-delay: 0.6s;
}

.love-bubble:nth-child(12) {
    animation-delay: 0.65s;
}

.love-instruction {
    color: var(--light-pink);
    margin-top: 2rem;
    font-size: 1rem;
    opacity: 0.8;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Love Letter */
#love-letter {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.envelope {
    position: relative;
    width: 300px;
    height: 200px;
    cursor: pointer;
    transition: all 0.5s ease;
}

.envelope-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-love);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-romantic);
    font-size: 1.5rem;
    color: var(--white);
    box-shadow: var(--shadow-soft);
    transition: all 0.5s ease;
    z-index: 2;
}

.envelope.open .envelope-front {
    transform: rotateX(-180deg);
    opacity: 0;
}

.letter-content {
    position: absolute;
    width: 100%;
    min-height: 100%;
    background: var(--blush);
    border-radius: 20px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s ease 0.3s;
    box-shadow: var(--shadow-soft);
}

.envelope.open .letter-content {
    opacity: 1;
    transform: translateY(0);
}

.letter-text {
    font-family: var(--font-romantic);
    font-size: 1.2rem;
    color: var(--deep-rose);
    line-height: 1.8;
}

.envelope:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.footer-text {
    font-family: var(--font-romantic);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: colorShift 5s ease-in-out infinite;
    transition: all 0.3s ease;
    min-height: 2.5rem;
}

@keyframes colorShift {

    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(30deg);
    }
}

.made-with {
    color: var(--secondary-pink);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-love);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: fabPulse 2s ease-in-out infinite;
}

.fab:hover {
    transform: scale(1.2) rotate(15deg);
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 107, 157, 0.8);
    }
}

/* Explosion */
.explosion-heart {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    z-index: 9999;
    animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(360deg);
    }
}

/* Easter Egg & Bye */
.easter-egg-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 5vw, 3rem);
    font-family: var(--font-romantic);
    color: var(--primary-pink);
    text-shadow: 0 0 30px rgba(255, 107, 157, 0.8);
    z-index: 10000;
    animation: pulse 0.5s ease-in-out infinite;
    text-align: center;
    padding: 0 1rem;
}

.bye-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200000;
    animation: fadeIn 0.5s ease;
}

.bye-screen h1 {
    font-family: var(--font-romantic);
    font-size: 4rem;
    color: #ff4757;
    margin-bottom: 1rem;
}

.bye-screen p {
    color: #666;
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .names-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .heart-connector {
        transform: rotate(90deg);
    }

    .counter-display {
        gap: 0.5rem;
    }

    .counter-item {
        min-width: 60px;
        padding: 0.8rem 1rem;
    }

    .counter-value {
        font-size: 1.2rem;
    }

    .counter-label {
        font-size: 0.6rem;
    }

    .love-bubble {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .envelope {
        width: 250px;
        height: 170px;
    }

    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .section-title {
        flex-direction: column;
        gap: 0.5rem;
    }

    .password-container {
        padding: 2rem;
    }

    #password-input {
        width: 150px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .counter-section {
        padding: 1.5rem;
    }

    .counter-display {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .letter-content {
        padding: 1.5rem;
    }

    .letter-text {
        font-size: 1rem;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a0011;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-love);
    border-radius: 10px;
}

::selection {
    background: var(--primary-pink);
    color: var(--white);
}