
:root {
    --primary-pink: #ff6b8b;
    --primary-light: #ffa5a5;
    --primary-dark: #ff4d6d;
    --secondary-purple: #c471ed;
    --secondary-blue: #12c2e9;

    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-pink: linear-gradient(135deg, #ff6b8b 0%, #ffa5a5 100%);
    --gradient-sunset: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-candy: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);

    --white: #ffffff;
    --black: #2d3436;
    --gray-light: #f8f9fa;
    --gray: #6c757d;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(255, 107, 139, 0.4);

    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

body.theme-pink {
    --theme-primary: #ff6b8b;
    --theme-secondary: #ffa5a5;
    --theme-gradient: linear-gradient(135deg, #ff6b8b 0%, #ffa5a5 100%);
}

body.theme-blue {
    --theme-primary: #667eea;
    --theme-secondary: #764ba2;
    --theme-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.theme-green {
    --theme-primary: #56ab2f;
    --theme-secondary: #a8e063;
    --theme-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

body.theme-sunset {
    --theme-primary: #f093fb;
    --theme-secondary: #f5576c;
    --theme-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Ma Shan Zheng', 'ZCOOL KuaiLe', cursive, sans-serif;
    line-height: 1.6;
    color: var(--black);
    overflow-x: hidden;
    min-height: 100vh;
    background: var(--gradient-candy);
    position: relative;
}

.background-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.gradient-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top left, rgba(255, 107, 139, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(196, 113, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(18, 194, 233, 0.1) 0%, transparent 70%);
    animation: gradientShift 20s ease-in-out infinite;
}

.particle-field {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 182, 193, 0.2), transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255, 255, 255, 0.4), transparent);
    background-size: 50vw 50vh;
    animation: particleFloat 30s linear infinite;
}

#heartCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.music-control {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

#musicToggle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: transparent;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#musicToggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

#musicToggle:hover::before {
    opacity: 1;
}

#musicToggle.playing::before {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

#musicToggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.9);
}

#musicToggle.playing {
    border-color: var(--theme-primary);
    box-shadow: 0 0 20px rgba(255, 107, 139, 0.4);
}

.music-icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
    transition: all var(--transition-normal);
}

#musicToggle:hover .music-icon,
#musicToggle.playing .music-icon {
    color: var(--white);
    transform: scale(1.1);
}

#musicToggle.playing .music-icon {
    animation: musicDance 2s ease-in-out infinite;
}

.music-waves {
    position: absolute;
    display: flex;
    gap: 3px;
    bottom: 8px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

#musicToggle.playing .music-waves {
    opacity: 1;
}

.music-waves span {
    width: 3px;
    height: 12px;
    background: var(--white);
    border-radius: var(--radius-full);
    animation: wave 1s ease-in-out infinite;
}

.music-waves span:nth-child(2) {
    animation-delay: 0.2s;
    height: 16px;
}

.music-waves span:nth-child(3) {
    animation-delay: 0.4s;
    height: 10px;
}

.music-tip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    font-size: 0.9rem;
    color: var(--theme-primary);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all var(--transition-normal);
}

.music-tip.show {
    opacity: 1;
    transform: translateY(0);
}

.settings-control {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 100;
}

#settingsToggle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: transparent;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

#settingsToggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

#settingsToggle:hover::before {
    opacity: 1;
}

#settingsToggle.active::before {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

#settingsToggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.9);
}

#settingsToggle.active {
    border-color: var(--theme-primary);
    box-shadow: 0 0 20px rgba(255, 107, 139, 0.4);
}

#settingsToggle:hover,
#settingsToggle.active {
    color: var(--white);
}

#settingsToggle i {
    transition: transform var(--transition-normal);
    z-index: 1;
}

#settingsToggle.active i {
    transform: rotate(90deg);
}

.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 1s ease-out;
}

.character-container {
    margin-bottom: 2rem;
    animation: bounceIn 1s ease-out;
}

.character {
    width: 150px;
    height: 150px;
    position: relative;
    transition: transform var(--transition-normal);
}

.character:hover {
    transform: scale(1.05);
}

.character-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 8px 24px rgba(253, 203, 110, 0.4);
    animation: float 3s ease-in-out infinite;
    overflow: hidden;
    background: white;
    z-index: 2;
}

.character-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.eyes,
.eye,
.mouth,
.blush {
    display: none;
}

.music-visualizer {
    position: absolute;
    width: 170px;
    height: 170px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.character.music-playing .music-visualizer {
    opacity: 1;
}

.visualizer-bar {
    position: absolute;
    width: 4px;
    height: 12px;
    border-radius: 2px;
    top: 0;
    left: 50%;
    margin-left: -2px;
    transform-origin: center 85px;
    transition: height 0.05s linear, opacity 0.1s ease;
    will-change: height, opacity;
}


.visualizer-bar:nth-child(1) {
    background: linear-gradient(to bottom, #ff6b8b, #ff8da1);
    transform: rotate(0deg);
}

.visualizer-bar:nth-child(2) {
    background: linear-gradient(to bottom, #ff8da1, #ffb6c1);
    transform: rotate(22.5deg);
}

.visualizer-bar:nth-child(3) {
    background: linear-gradient(to bottom, #ffb6c1, #ff69b4);
    transform: rotate(45deg);
}

.visualizer-bar:nth-child(4) {
    background: linear-gradient(to bottom, #ff69b4, #ff1493);
    transform: rotate(67.5deg);
}

.visualizer-bar:nth-child(5) {
    background: linear-gradient(to bottom, #ff1493, #c471ed);
    transform: rotate(90deg);
}

.visualizer-bar:nth-child(6) {
    background: linear-gradient(to bottom, #c471ed, #764ba2);
    transform: rotate(112.5deg);
}

.visualizer-bar:nth-child(7) {
    background: linear-gradient(to bottom, #764ba2, #667eea);
    transform: rotate(135deg);
}

.visualizer-bar:nth-child(8) {
    background: linear-gradient(to bottom, #667eea, #12c2e9);
    transform: rotate(157.5deg);
}

.visualizer-bar:nth-child(9) {
    background: linear-gradient(to bottom, #12c2e9, #a8e063);
    transform: rotate(180deg);
}

.visualizer-bar:nth-child(10) {
    background: linear-gradient(to bottom, #a8e063, #56ab2f);
    transform: rotate(202.5deg);
}

.visualizer-bar:nth-child(11) {
    background: linear-gradient(to bottom, #56ab2f, #ffd700);
    transform: rotate(225deg);
}

.visualizer-bar:nth-child(12) {
    background: linear-gradient(to bottom, #ffd700, #ff8c00);
    transform: rotate(247.5deg);
}

.visualizer-bar:nth-child(13) {
    background: linear-gradient(to bottom, #ff8c00, #ff6347);
    transform: rotate(270deg);
}

.visualizer-bar:nth-child(14) {
    background: linear-gradient(to bottom, #ff6347, #ff4500);
    transform: rotate(292.5deg);
}

.visualizer-bar:nth-child(15) {
    background: linear-gradient(to bottom, #ff4500, #ff1493);
    transform: rotate(315deg);
}

.visualizer-bar:nth-child(16) {
    background: linear-gradient(to bottom, #ff1493, #ff6b8b);
    transform: rotate(337.5deg);
}


.visualizer-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
    background: inherit;
    filter: blur(4px);
    opacity: 0.6;
    z-index: -1;
}

@media (max-width: 768px) {
    .music-visualizer {
        width: 120px;
        height: 120px;
    }

    .visualizer-bar {
        width: 3px;
        height: 10px;
        transform-origin: center 60px;
    }
    .copyright {
        bottom: 15px;
        padding: 8px 25px;
        font-size: 13px;
    }
}


.main-question {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    animation: slideInDown 0.8s ease-out;
}

.question-text {
    background: var(--theme-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
    font-weight: bold;
    letter-spacing: 2px;
}

.question-decoration {
    position: absolute;
    top: -10px;
    right: -20px;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.buttons-group {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: slideInUp 1s ease-out;
}

.btn-yes,
.btn-no {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-weight: bold;
    letter-spacing: 1px;
    min-width: 140px;
}

.btn-yes {
    background: var(--theme-gradient);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(255, 107, 139, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.btn-yes::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-yes:hover::before {
    transform: translateX(100%);
}

.btn-yes:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 107, 139, 0.5);
}

.btn-no {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(127, 140, 141, 0.4);
}

.btn-no:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 30px rgba(127, 140, 141, 0.5);
}

.btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sparkle {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-yes:hover .btn-sparkle {
    opacity: 1;
    animation: sparkleRotate 2s linear infinite;
}

.hint-text {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    opacity: 0.8;
    animation: fadeIn 1.2s ease-out;
}

.hint-text p {
    margin: 0.5rem 0;
}

.success-scene {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
    overflow-y: auto;
    overflow-x: hidden;
}

.success-scene.show {
    display: flex;
    opacity: 1;
    animation: successIn 0.8s ease-out;
}

.success-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.success-gradient {
    position: absolute;
    inset: 0;
    background: var(--theme-gradient);
    animation: gradientShift 10s ease-in-out infinite;
}

.success-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
}

.success-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 100vh;
    padding: 3rem 2rem;
    text-align: center;
}

.success-emoji {
    font-size: 4rem;
    animation: bounce 1s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.success-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    animation: slideInDown 0.6s ease-out;
}

.love-messages {
    max-width: 600px;
    width: 100%;
    margin: 1.5rem auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.love-message {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    font-size: 1rem;
    color: var(--theme-primary);
    opacity: 0;
    animation: messageSlide 0.5s ease-out forwards;
    transition: transform var(--transition-normal);
}

.love-message:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.love-message:nth-child(odd) {
    align-self: flex-start;
}

.love-message:nth-child(even) {
    align-self: flex-end;
}

.success-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-celebrate{
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.95);
    color: var(--theme-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    box-shadow: var(--shadow-md);
}

.btn-celebrate:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.couple-animation {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.couple-heart {
    font-size: 2rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.couple-heart.right {
    animation-delay: 0.5s;
}

.couple-text {
    color: var(--white);
    font-size: 1.2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.settings-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.settings-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1;
}

.settings-header h3 {
    font-size: 1.5rem;
    color: var(--theme-primary);
    margin: 0;
}

.settings-close {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.settings-close:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.settings-body {
    padding: 1.5rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--black);
}

.setting-item input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.setting-item input[type="text"]:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 139, 0.1);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.help-text a {
    color: var(--theme-primary);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

.color-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-option {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.color-option::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.color-option.active {
    border-color: var(--white);
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.color-option.active::after {
    opacity: 1;
}

.setting-actions {
    margin-top: 2rem;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--theme-gradient);
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 600;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.link-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
}

.link-result.show {
    display: block;
}

.link-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.link-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.btn-copy {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gray-light);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-copy:hover {
    background: var(--theme-primary);
    color: var(--white);
}

.floating-decorations {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.decoration-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: floatDecoration 15s linear infinite;
}

.decoration-item.star {
    left: 10%;
    animation-duration: 12s;
}

.decoration-item.heart {
    left: 30%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.decoration-item.sparkle {
    left: 60%;
    animation-duration: 15s;
    animation-delay: 5s;
}

.decoration-item.cloud {
    left: 85%;
    animation-duration: 20s;
    animation-delay: 3s;
}

.footer-info {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    z-index: 10;
}

.heart-beat {
    display: inline-block;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.copyright {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 20px;
    border-radius: 20px;
    box-shadow: 
        0 2px 15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 182, 193, 0.2);
    text-align: center;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1001;
    cursor: pointer;
    width: fit-content;
    max-width: 90%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copyright-content {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

.copyright .main-text {
    color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.copyright .expand-btn {
    padding: 3px 8px;
    font-size: 12px;
    color: #ff6b8b;
    background: rgba(255, 107, 139, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.copyright .expand-btn:hover {
    background: rgba(255, 107, 139, 0.2);
    transform: translateY(-1px);
}

.copyright .star-text {
    color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding-left: 0;
    margin-left: 0;
    border-left: 1px solid transparent;
    line-height: 1.6;
}

.copyright .extra-text {
    display: block;
    color: rgba(0, 0, 0, 0.5);
    font-size: 11px;
    margin-top: 4px;
}

.copyright.expanded .star-text {
    opacity: 1;
    max-width: 200px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.copyright a {
    color: #ff6b8b;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 2px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .main-container {
        padding: 1rem;
        min-height: 100vh;
        justify-content: center;
    }

    .character {
        width: 100px;
        height: 100px;
    }

    .character-face {
        box-shadow: 0 6px 18px rgba(253, 203, 110, 0.4);
    }

    .main-question {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .buttons-group {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        gap: 1rem;
        justify-content: center;
        padding: 0 1rem;
    }

    .btn-yes,
    .btn-no {
        width: auto;
        min-width: 130px;
        max-width: 160px;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 2rem;
    }

    .music-control {
        top: 1rem;
        right: 1rem;
    }

    .settings-control {
        top: 1rem;
        left: 1rem;
    }

    #musicToggle,
    #settingsToggle {
        width: 3rem;
        height: 3rem;
        border-width: 2px;
    }

    .music-icon {
        font-size: 1rem;
    }

    #settingsToggle {
        font-size: 1rem;
    }

    .music-waves {
        display: none;
    }

    .music-tip {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        white-space: normal;
        max-width: 150px;
        text-align: center;
    }

    .settings-panel {
        width: 95%;
        max-width: 400px;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }

    .settings-header {
        padding: 1.2rem;
    }

    .settings-header h3 {
        font-size: 1.2rem;
    }

    .settings-body {
        padding: 1.2rem;
    }

    .setting-item {
        margin-bottom: 1.2rem;
    }

    .setting-item label {
        font-size: 0.95rem;
    }

    .setting-item input[type="text"] {
        padding: 0.65rem 0.9rem;
        font-size: 0.95rem;
    }

    .color-options {
        gap: 0.6rem;
    }

    .color-option {
        width: 2.5rem;
        height: 2.5rem;
    }

    .btn-generate {
        padding: 0.9rem;
        font-size: 1rem;
    }

    .success-content {
        padding: 2rem 1rem;
    }

    .success-emoji {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .success-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 1.5rem;
    }

    .love-messages {
        padding: 0 0.5rem;
        gap: 0.6rem;
        max-width: 100%;
    }

    .love-message {
        font-size: 0.9rem;
        padding: 0.65rem 1.2rem;
        border-radius: var(--radius-md);
    }

    .success-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin-top: 1.5rem;
        gap: 0.8rem;
    }

    .btn-celebrate {
        width: 100%;
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    .couple-animation {
        margin-top: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .couple-heart {
        font-size: 1.5rem;
    }

    .couple-text {
        font-size: 1rem;
    }

    .hint-text {
        font-size: 1rem;
    }

    .footer-info {
        font-size: 0.8rem;
        bottom: 0.5rem;
    }

    .decoration-item {
        font-size: 1.5rem;
    }

    .copyright {
        font-size: 11px;
        padding: 6px 12px;
        max-width: 95%;
        bottom: 10px;
    }

    .copyright-content {
        gap: 4px;
    }

    .copyright .main-text {
        font-size: 11px;
    }

    .copyright .expand-btn {
        padding: 2px 6px;
        font-size: 10px;
        margin: 0 2px;
    }

    .copyright .star-text {
        font-size: 10px;
    }

    .copyright.expanded .star-text {
        margin-left: 4px;
        padding-left: 4px;
    }

    .copyright .extra-text {
        font-size: 10px;
        margin-top: 3px;
    }

    .copyright a {
        margin: 0 1px;
    }
}

@media (max-width: 360px) {
    .copyright {
        font-size: 10px;
        padding: 4px 10px;
    }

    .copyright .main-text {
        font-size: 10px;
    }

    .copyright .expand-btn {
        padding: 1px 4px;
        font-size: 9px;
    }

    .copyright .star-text {
        font-size: 9px;
    }

    .copyright.expanded .star-text {
        margin-left: 3px;
        padding-left: 3px;
    }
}


@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .main-question {
        font-size: clamp(1.3rem, 7vw, 1.8rem);
        margin-bottom: 1.5rem;
    }

    .character {
        width: 90px;
        height: 90px;
    }

    .buttons-group {
        gap: 0.8rem;
        padding: 0 0.5rem;
    }

    .btn-yes,
    .btn-no {
        min-width: 120px;
        max-width: 145px;
        padding: 0.9rem 1.8rem;
        font-size: 1.05rem;
        border-radius: 2rem;
    }

    #musicToggle,
    #settingsToggle {
        width: 2.8rem;
        height: 2.8rem;
    }

    .music-icon {
        font-size: 0.95rem;
    }

    #settingsToggle {
        font-size: 0.95rem;
    }

    .settings-panel {
        max-height: 90vh;
    }

    .success-emoji {
        font-size: 2.5rem;
    }

    .love-message {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .music-visualizer {
        width: 100px;
        height: 100px;
    }

    .visualizer-bar {
        width: 2.5px;
        height: 8px;
        transform-origin: center 50px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .main-container {
        min-height: auto;
        padding: 1rem 2rem;
    }

    .character {
        width: 80px;
        height: 80px;
    }

    .main-question {
        margin-bottom: 1.5rem;
    }

    .buttons-group {
        flex-direction: row;
        max-width: 100%;
    }

    .btn-yes,
    .btn-no {
        width: auto;
        padding: 0.8rem 2rem;
    }

    .success-content {
        padding: 1.5rem 2rem;
    }

    .love-messages {
        max-width: 600px;
    }

    .success-actions {
        flex-direction: row;
        max-width: 100%;
    }

    .btn-celebrate {
        width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    .main-container {
        padding: 2rem;
    }

    .character {
        width: 130px;
        height: 130px;
    }

    .main-question {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

    .settings-panel {
        max-width: 550px;
    }
}

@media (hover: none) and (pointer: coarse) {

    .btn-yes,
    .btn-no,
    #musicToggle,
    #settingsToggle,
    .btn-celebrate {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .btn-yes:active {
        transform: scale(0.95);
    }

    .btn-no:active {
        transform: scale(0.95);
    }

    #musicToggle:active,
    #settingsToggle:active {
        transform: scale(0.9);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}