/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 30%, #ffb6c1 100%);
    font-family: 'Poppins', sans-serif;
    color: #fff;
    position: fixed;
}

body {
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: block;
}

/* Setup Screen */
.setup-container {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 20, 147, 0.95);
    overflow-y: auto;
}

.heart-icon {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 20px;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0.9;
    font-size: 1.1rem;
}

.input-group {
    width: 100%;
    max-width: 400px;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1.1rem;
}

.input-group label i {
    margin-right: 10px;
    color: #ffebf3;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    color: #ff1493;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.3);
}

.hint {
    font-size: 0.85rem;
    margin-top: 5px;
    opacity: 0.8;
    padding-left: 5px;
}

/* Image Upload Styles */
.image-upload-container {
    margin-top: 10px;
}

.image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px dashed rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    overflow: hidden;
    position: relative;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.image-preview i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.image-preview span {
    font-size: 0.9rem;
    text-align: center;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.8);
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.upload-btn, .remove-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.upload-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.remove-btn {
    background: rgba(255, 20, 147, 0.8);
    color: white;
}

.upload-btn:active, .remove-btn:active {
    transform: scale(0.95);
}

.days-together {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: center;
    width: 100%;
    max-width: 400px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.days-together i {
    margin-right: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.submit-btn {
    width: 100%;
    max-width: 400px;
    padding: 18px;
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.submit-btn:enabled {
    background: linear-gradient(45deg, #ff0066, #ff1493);
    animation: enablePulse 2s infinite;
}

@keyframes enablePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 8px 20px rgba(255, 20, 147, 0.6); }
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.note {
    margin-top: 30px;
    padding: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.note i {
    margin-right: 8px;
}

/* App Screen */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 20, 147, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.greeting {
    font-size: 1.2rem;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.music-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-badge {
    background: linear-gradient(45deg, #ff0066, #ff1493);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, #ff1493 0%, #ff69b4 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.side-menu.active {
    left: 0;
}

.menu-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 20, 147, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.menu-header h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.menu-content {
    padding: 20px;
}

.user-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info.has-image .avatar {
    background-size: cover;
    background-position: center;
    position: relative;
}

.user-info.has-image .avatar i {
    display: none;
}

.user-info.has-image .avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 20, 147, 0.3);
    border-radius: 50%;
}

.avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
}

.user-info h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.love-days {
    opacity: 0.9;
    font-size: 0.9rem;
}

.menu-section {
    margin-bottom: 25px;
}

.menu-section h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.days-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.day-menu-item {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.day-menu-item.active {
    background: rgba(255, 255, 255, 0.25);
    border-left: 4px solid white;
}

.day-menu-item.completed .day-check {
    color: #90ff90;
}

.day-check {
    font-size: 0.9rem;
}

.menu-item {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    padding-bottom: 120px;
}

.day-header {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.day-title-container {
    margin-bottom: 15px;
}

#day-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.day-date {
    opacity: 0.9;
    font-size: 0.95rem;
}

.day-progress {
    margin-top: 15px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0066, #ff69b4);
    border-radius: 4px;
    width: 14.28%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Day Content */
.day-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.day-message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
    font-style: italic;
}

.day-animation {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
    position: relative;
}

.rose-animation, .heart-animation, .choco-animation, .teddy-animation, .promise-animation, .hug-animation, .kiss-animation {
    width: 100%;
    height: 100%;
    position: relative;
}

.interactive-area {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.interactive-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffebf3;
}

.interactive-btn {
    background: linear-gradient(45deg, #ff0066, #ff1493);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 5px;
    box-shadow: 0 4px 10px rgba(255, 20, 147, 0.3);
    transition: transform 0.3s;
}

.interactive-btn:active {
    transform: scale(0.95);
}

/* Navigation */
.day-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
}

/* Music Player - Hidden by Default */
.music-player {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    border-radius: 25px 25px 0 0;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-height: 70vh;
    overflow-y: auto;
    display: block;
}

.music-player.active {
    bottom: 0;
}

.music-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    display: none;
    backdrop-filter: blur(3px);
}

.music-overlay.active {
    display: block;
}

.music-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.music-player-header h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    color: white;
    margin: 0;
}

.close-music {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-music:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.album-art {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.album-art i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.music-details {
    flex: 1;
}

.music-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.music-day {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.music-status {
    font-size: 0.85rem;
    opacity: 0.8;
}

.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 25px 0;
}

.music-control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.music-control-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

#music-play-pause {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.volume-control i {
    font-size: 1.2rem;
    opacity: 0.8;
}

#volume-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 2px solid #ff1493;
}

.playlist {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin-top: 15px;
}

.playlist-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-title i {
    color: #ffebf3;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 3px solid white;
}

.playlist-item .day-info {
    flex: 1;
}

.playlist-item .day-name {
    font-weight: 500;
    font-size: 1rem;
}

.playlist-item .day-date {
    font-size: 0.85rem;
    opacity: 0.8;
}

.playlist-item .play-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 20, 147, 0.95);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 40;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-text {
    font-size: 0.9rem;
}

.footer-text .pulse {
    animation: heartbeat 1.5s infinite;
    color: #ffebf3;
}

.footer-countdown {
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 10px;
}

/* Valentine's Day End Screen Styles */
.valentine-end-screen {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        transform: translateY(50px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.end-screen-content {
    animation: slideInUp 0.8s ease-out 0.3s both;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff1493;
    animation: confetti-fall 5s linear infinite;
}

.confetti:nth-child(2n) {
    background: #ff69b4;
}

.confetti:nth-child(3n) {
    background: #ff0066;
}

.confetti:nth-child(4n) {
    background: #ffb6c1;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Sparkle Animation */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* Love Pulse Animation */
.love-pulse {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 20, 147, 0.5);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Additional Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Responsive Design - Mobile Only */
@media only screen and (min-width: 768px) {
    body::before {
        content: "This experience is designed exclusively for mobile devices. Please open on your phone.";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 20px;
        font-size: 1.5rem;
        z-index: 9999;
        font-weight: bold;
    }
    
    .screen, .app-header, .main-content, .app-footer {
        display: none !important;
    }
}

/* Responsive adjustments for end screen */
@media (max-width: 480px) {
    .end-screen-content h1 {
        font-size: 2.5rem !important;
    }
    
    .end-message {
        font-size: 1.1rem !important;
        padding: 15px !important;
    }
    
    .love-stats {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    #close-end-screen {
        padding: 12px 25px !important;
        font-size: 1rem !important;
    }
}