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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #121212;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-y;
}

#app {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    width: 100vw;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Input Form Styles */
.input-screen {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding: 24px;
    background: linear-gradient(180deg, #121212 0%, #1a1a1a 100%);
}

.input-screen h1 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #FF6B5A, #FFD700, #1DB954, #00CED1, #FF1493, #FF6B5A);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 90, 0.6)) 
            drop-shadow(0 0 40px rgba(29, 185, 84, 0.4));
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.input-screen .subtitle {
    font-size: 16px;
    color: #b3b3b3;
    margin-bottom: 32px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 14px;
    background: #282828;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #FF6B5A;
    background: #333;
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.input-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #b3b3b3;
}

.input-hint {
    font-size: 13px;
    color: #b3b3b3;
    font-style: italic;
    margin-top: 4px;
}

.start-button {
    width: 100%;
    padding: 18px;
    background: #FF6B5A;
    border: none;
    border-radius: 500px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 32px;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.start-button:hover {
    background: #ff5242;
    transform: scale(1.02);
}

.start-button:active {
    transform: scale(0.98);
}

/* Card Viewer */
.card-viewer {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    width: 100vw;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Card Container */
.card-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.card.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    z-index: 100 !important;
}

.card.exit-left {
    opacity: 0 !important;
    transform: translateX(-100%) !important;
    z-index: 50 !important;
}

/* Card Content Styles */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: #F5F1E8;
    border-radius: 16px;
    padding: 40px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Ensure content is above background effects */
.card-content > h2,
.card-content > p,
.card-content > .stats-list,
.card-content > .tags-container,
.card-content > .summary-grid,
.card-content > button,
.card-content > .share-button {
    position: relative;
    z-index: 10;
}

/* Ensure decorations stay behind */
.card-content > .decoration,
.card-content > svg {
    z-index: 2;
}

.card-title {
    font-size: 48px;
    font-weight: 900;
    color: #121212;
    margin-bottom: 16px;
    letter-spacing: -2px;
    line-height: 1;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.card-title.gradient-glow {
    background: linear-gradient(90deg, #FF6B5A, #FFD700, #1DB954, #00CED1, #FF1493, #FF6B5A);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out 0.3s both, gradientShift 4s linear infinite;
    filter: drop-shadow(0 0 15px rgba(255, 107, 90, 0.5)) 
            drop-shadow(0 0 30px rgba(29, 185, 84, 0.3));
}

.card-subtitle {
    font-size: 18px;
    color: #121212;
    margin-bottom: 32px;
    opacity: 0.8;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.card-main-stat {
    font-size: 72px;
    font-weight: 900;
    color: #121212;
    margin: 24px 0;
    letter-spacing: -3px;
    animation: scaleIn 0.6s ease-out 0.4s both;
    word-break: break-word;
}

.moment-text {
    font-size: 32px !important;
    padding: 0 10px;
}

.card-secondary-text {
    font-size: 16px;
    color: #121212;
    opacity: 0.7;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.stats-list {
    width: 100%;
    max-width: 300px;
    margin: 24px auto;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid rgba(18, 18, 18, 0.1);
    animation: fadeInUp 0.6s ease-out both;
}

.stat-item:nth-child(1) { animation-delay: 0.4s; }
.stat-item:nth-child(2) { animation-delay: 0.5s; }
.stat-item:nth-child(3) { animation-delay: 0.6s; }
.stat-item:nth-child(4) { animation-delay: 0.7s; }
.stat-item:nth-child(5) { animation-delay: 0.8s; }

.stat-item:last-child {
    border-bottom: none;
}

.stat-rank {
    font-size: 24px;
    font-weight: 900;
    color: #FF6B5A;
    min-width: 40px;
}

.stat-name {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: #121212;
    text-align: left;
    margin-left: 16px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
    max-width: 320px;
}

.tag {
    padding: 12px 20px;
    background: #121212;
    color: #F5F1E8;
    border-radius: 500px;
    font-size: 16px;
    font-weight: 700;
    animation: scaleIn 0.4s ease-out both;
}

.tag:nth-child(1) { animation-delay: 0.4s; }
.tag:nth-child(2) { animation-delay: 0.5s; }
.tag:nth-child(3) { animation-delay: 0.6s; }
.tag:nth-child(4) { animation-delay: 0.7s; }

/* Decorative Elements */
.decoration {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.squiggle {
    stroke: #121212;
    stroke-width: 3;
    fill: none;
    opacity: 0.3;
}

.circle-pattern {
    fill: none;
    stroke: #121212;
    stroke-width: 2;
    opacity: 0.2;
}

.zebra-pattern {
    position: absolute;
    width: 120px;
    height: 120px;
    background: repeating-linear-gradient(
        45deg,
        #121212,
        #121212 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.15;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #121212;
}

.nav-button {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid #535353;
    border-radius: 500px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-button:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #535353;
}

.nav-button.primary {
    background: #FF6B5A;
    border-color: #FF6B5A;
}

.nav-button.primary:hover {
    background: #ff5242;
    border-color: #ff5242;
}

.progress-dots {
    display: flex;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #535353;
    transition: all 0.3s;
}

.progress-dot.active {
    background: #FF6B5A;
    width: 24px;
    border-radius: 4px;
}

/* Share Button */
/* Summary Card Buttons */
.summary-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: calc(100% - 48px);
    max-width: 400px;
    margin: 0 auto 24px;
}

.share-button,
.modify-button {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 500px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.share-button {
    background: #1DB954;
}

.share-button:hover {
    background: #1ed760;
    transform: scale(1.02);
}

.share-button:active {
    transform: scale(0.98);
}

.modify-button {
    background: #282828;
    border: 2px solid #FF6B5A;
    color: #FF6B5A;
}

.modify-button:hover {
    background: #FF6B5A;
    color: #fff;
    transform: scale(1.02);
}

.modify-button:active {
    transform: scale(0.98);
}

/* Download Button */
.download-button {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(40, 40, 40, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 107, 90, 0.5);
    border-radius: 50%;
    color: #FF6B5A;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.download-button:hover {
    background: rgba(255, 107, 90, 0.9);
    color: #fff;
    border-color: #FF6B5A;
    transform: scale(1.05);
}

.download-button:active {
    transform: scale(0.95);
}

.download-button svg {
    width: 20px;
    height: 20px;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* Welcome Card Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Minutes Card Animations */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 107, 90, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 107, 90, 0.6);
    }
}

/* Artists/Songs Card Animations */
@keyframes slideInStaggered {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rankBounce {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* Genres/Moods Tag Animations */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

/* Moment Card Animations */
@keyframes spotlightIn {
    from {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Summary Card Animations */
@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(-90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

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

/* Decoration Animations */
@keyframes draw {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInRotate {
    from {
        opacity: 0;
        transform: rotate(-45deg) scale(0.5);
    }
    to {
        opacity: 0.15;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Summary Card Special Styles */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    margin: 24px auto;
}

.summary-stat {
    background: rgba(18, 18, 18, 0.05);
    padding: 16px;
    border-radius: 12px;
    animation: scaleIn 0.4s ease-out both;
}

.summary-stat:nth-child(1) { animation-delay: 0.3s; }
.summary-stat:nth-child(2) { animation-delay: 0.4s; }
.summary-stat:nth-child(3) { animation-delay: 0.5s; }
.summary-stat:nth-child(4) { animation-delay: 0.6s; }

.summary-stat-value {
    font-size: 28px;
    font-weight: 900;
    color: #FF6B5A;
    margin-bottom: 4px;
}

.summary-stat-label {
    font-size: 13px;
    color: #121212;
    opacity: 0.6;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: linear-gradient(135deg, #1a1a1a 0%, #121212 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-out;
}

.loading-screen.loading-complete {
    animation: fadeOut 0.5s ease-out forwards;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 400px;
    padding: 40px;
}

.loading-logo {
    margin-bottom: 40px;
    animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
}

.bar {
    width: 12px;
    background: linear-gradient(180deg, #FF6B5A 0%, #FF8A7A 100%);
    border-radius: 6px;
    animation: barAnimation 0.8s ease-in-out infinite;
}

.bar:nth-child(1) {
    animation-delay: 0s;
    height: 40%;
}

.bar:nth-child(2) {
    animation-delay: 0.1s;
    height: 70%;
}

.bar:nth-child(3) {
    animation-delay: 0.2s;
    height: 90%;
}

.bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 60%;
}

.bar:nth-child(5) {
    animation-delay: 0.4s;
    height: 50%;
}

@keyframes barAnimation {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.5);
    }
}

.loading-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #FF6B5A, #FFD700, #1DB954, #00CED1, #FF1493, #FF6B5A);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.3s both, gradientShift 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 90, 0.6)) 
            drop-shadow(0 0 40px rgba(29, 185, 84, 0.4));
}

.loading-step {
    font-size: 18px;
    color: #b3b3b3;
    margin-bottom: 32px;
    min-height: 28px;
    transition: opacity 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF6B5A 0%, #FF8A7A 50%, #FF6B5A 100%);
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: shimmerProgress 2s linear infinite;
}

@keyframes shimmerProgress {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.loading-circle {
    position: absolute;
    border: 3px solid rgba(255, 107, 90, 0.3);
    border-radius: 50%;
    animation: expandFade 3s ease-out infinite;
}

.circle-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 10%;
    animation-delay: 1s;
}

.circle-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 15%;
    animation-delay: 2s;
}

@keyframes expandFade {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.loading-squiggle {
    position: absolute;
    width: 100px;
    height: 100px;
    opacity: 0.2;
}

.squiggle-1 {
    top: 20%;
    right: 15%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M 0 50 Q 25 20, 50 50 T 100 50" stroke="%23FF6B5A" stroke-width="3" fill="none"/></svg>');
    animation: float 4s ease-in-out infinite;
}

.squiggle-2 {
    bottom: 25%;
    left: 10%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M 0 50 Q 25 80, 50 50 T 100 50" stroke="%23FF6B5A" stroke-width="3" fill="none"/></svg>');
    animation: float 4s ease-in-out 2s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 480px) {
    /* Input Screen Mobile */
    .input-screen {
        padding: 20px 16px;
    }
    
    .input-screen h1 {
        font-size: 28px;
        filter: drop-shadow(0 0 15px rgba(255, 107, 90, 0.5)) 
                drop-shadow(0 0 30px rgba(29, 185, 84, 0.3));
    }
    
    .input-screen .subtitle {
        font-size: 14px;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .input-group input,
    .input-group textarea {
        padding: 12px;
        font-size: 16px; /* Keep at 16px to prevent zoom on iOS */
    }
    
    .start-button {
        padding: 16px;
        font-size: 16px;
    }
    
    /* Card Mobile Adjustments */
    .card {
        padding: 16px;
    }
    
    .card-content {
        padding: 32px 20px;
        border-radius: 12px;
    }
    
    .card-title {
        font-size: 36px;
        margin-bottom: 12px;
        letter-spacing: -1.5px;
    }
    
    .card-subtitle {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .card-main-stat {
        font-size: 56px;
        margin: 20px 0;
        letter-spacing: -2px;
    }
    
    .card-secondary-text {
        font-size: 15px;
    }
    
    /* Stats List Mobile */
    .stats-list {
        max-width: 100%;
        margin: 20px auto;
    }
    
    .stat-item {
        padding: 14px 0;
    }
    
    .stat-rank {
        font-size: 20px;
        min-width: 35px;
    }
    
    .stat-name {
        font-size: 16px;
        margin-left: 12px;
    }
    
    /* Tags Mobile */
    .tags-container {
        gap: 10px;
        max-width: 100%;
        margin: 20px 0;
    }
    
    .tag {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    /* Summary Grid Mobile */
    .summary-grid {
        gap: 12px;
        max-width: 100%;
        margin: 20px auto;
    }
    
    .summary-stat {
        padding: 14px;
    }
    
    .summary-stat-value {
        font-size: 24px;
    }
    
    .summary-stat-label {
        font-size: 12px;
    }
    
    /* Navigation Mobile */
    .navigation {
        padding: 16px 16px 20px;
    }
    
    .nav-button {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    .progress-dots {
        gap: 6px;
    }
    
    .progress-dot {
        width: 7px;
        height: 7px;
    }
    
    .progress-dot.active {
        width: 20px;
    }
    
    /* Share Button Mobile */
    .summary-buttons {
        width: calc(100% - 32px);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .share-button,
    .modify-button {
        padding: 16px;
        font-size: 16px;
    }
    
    /* Loading Screen Mobile */
    .loading-content {
        padding: 24px;
        max-width: 100%;
    }
    
    .loading-logo {
        margin-bottom: 32px;
    }
    
    .music-bars {
        height: 70px;
        gap: 6px;
    }
    
    .bar {
        width: 10px;
    }
    
    .loading-title {
        font-size: 28px;
        filter: drop-shadow(0 0 15px rgba(255, 107, 90, 0.5)) 
                drop-shadow(0 0 30px rgba(29, 185, 84, 0.3));
    }
    
    .loading-step {
        font-size: 16px;
        margin-bottom: 28px;
    }
    
    /* Decorations Mobile - Scale Down */
    .decoration {
        transform: scale(0.8);
    }
    
    .zebra-pattern {
        width: 100px;
        height: 100px;
    }
    
    .loading-circle {
        border-width: 2px;
    }
    
    .circle-1 {
        width: 80px;
        height: 80px;
    }
    
    .circle-2 {
        width: 120px;
        height: 120px;
    }
    
    .circle-3 {
        width: 60px;
        height: 60px;
    }
    
    .loading-squiggle {
        width: 80px;
        height: 80px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .input-screen h1 {
        font-size: 24px;
        filter: drop-shadow(0 0 12px rgba(255, 107, 90, 0.4)) 
                drop-shadow(0 0 25px rgba(29, 185, 84, 0.3));
    }
    
    .card-title {
        font-size: 32px;
    }
    
    .card-main-stat {
        font-size: 48px;
    }
    
    .stat-name {
        font-size: 15px;
    }
    
    .tag {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .loading-title {
        font-size: 24px;
        filter: drop-shadow(0 0 12px rgba(255, 107, 90, 0.4)) 
                drop-shadow(0 0 25px rgba(29, 185, 84, 0.3));
    }
    
    .loading-step {
        font-size: 15px;
    }
    
    .summary-stat-value {
        font-size: 20px;
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .card-content {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .stats-list {
        max-width: 400px;
    }
    
    .tags-container {
        max-width: 400px;
    }
    
    .summary-grid {
        max-width: 400px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-button {
        min-height: 44px;
        min-width: 80px;
    }
    
    .start-button {
        min-height: 48px;
    }
    
    .share-button,
    .modify-button {
        min-height: 48px;
    }
    
    /* Download button mobile */
    .download-button {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .nav-button:hover,
    .start-button:hover,
    .share-button:hover,
    .modify-button:hover,
    .download-button:hover {
        transform: none;
    }
    
    /* Enhanced active states for touch */
    .nav-button:active,
    .start-button:active,
    .share-button:active,
    .modify-button:active,
    .download-button:active {
        transform: scale(0.95);
    }
    
    /* Swipe indicator hint */
    .card-container::after {
        content: '';
        position: absolute;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        animation: swipeHint 2s ease-in-out infinite;
        pointer-events: none;
        z-index: 1000;
    }
    
    @keyframes swipeHint {
        0%, 100% {
            transform: translateX(-50%) translateX(0);
            opacity: 0.3;
        }
        50% {
            transform: translateX(-50%) translateX(-15px);
            opacity: 0.6;
        }
    }
}

/* Welcome Card Special Button */
.lets-go-button {
    padding: 16px 48px;
    background: #FF6B5A;
    border: none;
    border-radius: 500px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 32px;
    animation: scaleIn 0.6s ease-out 0.7s both;
    letter-spacing: 0.5px;
}

.lets-go-button:hover {
    background: #ff5242;
    transform: scale(1.05);
}

.lets-go-button:active {
    transform: scale(0.95);
}

/* Music Control */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: fadeInDown 0.6s ease-out 0.5s both;
}

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

.music-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.music-toggle:hover {
    background: rgba(255, 107, 90, 0.2);
    border-color: rgba(255, 107, 90, 0.5);
    transform: scale(1.05);
}

.music-toggle:active {
    transform: scale(0.95);
}

.music-toggle.muted {
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.6;
}

.music-icon,
.mute-icon {
    transition: all 0.2s ease;
}

/* Mobile adjustments for music control */
@media (max-width: 480px) {
    .music-control {
        top: 16px;
        right: 16px;
    }
    
    .music-toggle {
        width: 48px;
        height: 48px;
    }
    
    .music-icon,
    .mute-icon {
        width: 20px;
        height: 20px;
    }
}

/* Particle Effects */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 100;
}

.particle {
    position: absolute;
    pointer-events: none;
}

.particle-confetti {
    border-radius: 2px;
    opacity: 0;
}

.particle-sparkle {
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,215,0,0.8) 50%, transparent 100%);
    opacity: 0;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.particle-burst {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
}

.particle-note {
    font-weight: bold;
    opacity: 0;
    text-shadow: 0 0 10px currentColor;
}

/* Particle Animations */
@keyframes particleFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

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

@keyframes burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        ) scale(0);
    }
}

@keyframes noteFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(180deg) scale(0.5);
    }
}

/* Wave effect for card transitions */
.card-transition-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.wave-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FF6B5A, #FFD700, #1DB954, transparent);
    opacity: 0;
    animation: wave 0.6s ease-out forwards;
}

@keyframes wave {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Enhanced Card Animations */

/* Ambient Background Gradient Animation */
.card-content.animated-bg {
    background: linear-gradient(135deg, #F5F1E8 0%, #FFF8F0 50%, #F5F1E8 100%);
    background-size: 200% 200%;
    animation: ambientGradient 8s ease infinite;
}

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

/* Floating Orbs Background */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: floatOrb 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.orb-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 90, 0.4), transparent);
    top: 10%;
    left: -50px;
    animation-delay: 0s;
}

.orb-2 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(29, 185, 84, 0.4), transparent);
    bottom: 20%;
    right: -30px;
    animation-delay: 2s;
}

.orb-3 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    top: 50%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Shimmer Overlay Effect */
.shimmer-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmerMove 6s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shimmerMove {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Pulsing Glow Ring */
.glow-ring {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid transparent;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseRing 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes pulseRing {
    0%, 100% {
        border-color: rgba(255, 107, 90, 0.3);
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        border-color: rgba(29, 185, 84, 0.5);
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Rainbow Border Animation */
.rainbow-border {
    position: absolute;
    inset: -3px;
    border-radius: 16px;
    padding: 3px;
    background: linear-gradient(
        90deg,
        #FF6B5A,
        #FFD700,
        #1DB954,
        #00CED1,
        #FF1493,
        #9D4EDD,
        #FF6B5A
    );
    background-size: 300% 300%;
    animation: rainbowRotate 6s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

@keyframes rainbowRotate {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

/* Morphing Blob Animation */
.blob-shape {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.15;
    filter: blur(30px);
    animation: morphBlob 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.blob-1 {
    background: linear-gradient(45deg, #FF6B5A, #FFD700);
    top: 5%;
    right: 10%;
    animation-delay: 0s;
}

.blob-2 {
    background: linear-gradient(45deg, #1DB954, #00CED1);
    bottom: 10%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes morphBlob {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg) scale(1);
    }
    33% {
        border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
        transform: rotate(120deg) scale(1.1);
    }
    66% {
        border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
        transform: rotate(240deg) scale(0.9);
    }
}

/* Smooth Scale Pulse */
.pulse-gentle {
    animation: pulseGentle 3s ease-in-out infinite;
}

@keyframes pulseGentle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Color Shift Text */
.color-shift {
    animation: colorShift 8s ease-in-out infinite;
}

@keyframes colorShift {
    0%, 100% {
        color: #121212;
    }
    25% {
        color: #FF6B5A;
    }
    50% {
        color: #1DB954;
    }
    75% {
        color: #FFD700;
    }
}

/* Breathing Glow Effect */
.breathing-glow {
    animation: breathingGlow 4s ease-in-out infinite;
}

@keyframes breathingGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                    inset 0 0 30px rgba(255, 107, 90, 0.1);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                    inset 0 0 60px rgba(29, 185, 84, 0.2);
    }
}

/* Rotating Rays */
.rotating-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    animation: rotateRays 20s linear infinite;
    z-index: 1;
}

.ray {
    position: absolute;
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform-origin: center;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent
    );
}

.ray:nth-child(1) { transform: rotate(0deg); }
.ray:nth-child(2) { transform: rotate(45deg); }
.ray:nth-child(3) { transform: rotate(90deg); }
.ray:nth-child(4) { transform: rotate(135deg); }

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

/* Particle Trail */
.particle-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 107, 90, 0.6);
    pointer-events: none;
    animation: trailFade 2s ease-out infinite;
}

@keyframes trailFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Liquid Flow Effect */
.liquid-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    opacity: 0.2;
    pointer-events: none;
}

.liquid-wave svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    animation: liquidFlow 8s linear infinite;
}

@keyframes liquidFlow {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Glitch Effect for Special Moments */
.glitch-effect {
    animation: glitch 1s ease-in-out;
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(30deg);
    }
    40% {
        transform: translate(2px, -2px);
        filter: hue-rotate(-30deg);
    }
    60% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(60deg);
    }
    80% {
        transform: translate(2px, 2px);
        filter: hue-rotate(-60deg);
    }
}

/* Smooth Number Counter */
@keyframes countPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Aurora Background */
.aurora-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.4;
    z-index: 1;
}

.aurora-light {
    position: absolute;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 20%,
        rgba(255, 107, 90, 0.3) 40%,
        rgba(29, 185, 84, 0.3) 60%,
        transparent 80%
    );
    animation: auroraMove 15s ease-in-out infinite;
}

@keyframes auroraMove {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    50% {
        transform: translate(-30%, -30%) rotate(180deg);
    }
}
