/* ===========================================
   REMIXIFY - Main App Page
   Organic/Natural Design with Spotify Colors
   Two-Phase Track Selection UI
   =========================================== */

/* Organic Blob Backgrounds */
.blob {
    position: fixed;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    animation: blob-drift 25s ease-in-out infinite;
}

.blob-1 {
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: linear-gradient(135deg, var(--primary) 0%, rgba(29, 185, 84, 0.3) 100%);
    top: -100px;
    left: -50px;
}

.blob-2 {
    width: min(400px, 70vw);
    height: min(400px, 70vw);
    background: rgba(29, 185, 84, 0.35);
    bottom: -50px;
    right: -50px;
    animation-delay: -12s;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

@keyframes blob-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -15px) scale(1.02); }
    66% { transform: translate(-15px, 10px) scale(0.98); }
}

/* Container */
.container {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    position: relative;
    overflow-x: hidden;
}

.phase-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

.wrapper {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-header .brand-mark {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
}

.brand-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

/* Hero Section */
.hero-section {
    margin-bottom: 2.5rem;
}

.hero-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.5rem, 7vw, 3.5rem);
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--primary);
    text-shadow: 0 0 40px rgba(29, 185, 84, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--foreground-muted);
    max-width: 450px;
    margin: 0 auto;
}

/* Playlist Counter */
.playlist-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.5rem 1.25rem;
    background: var(--primary-muted);
    border-radius: 2rem;
    font-size: 0.9rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-number {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    min-width: 2ch;
    text-align: center;
}

.counter-label {
    color: var(--foreground-muted);
}

/* Search Card */
.search-card {
    width: 100%;
    background: var(--background-elevated);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 0.5rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.search-card:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-float), 0 0 0 3px rgba(29, 185, 84, 0.1);
    transform: none; /* Prevent any movement on focus */
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
}

.input-icon {
    color: var(--foreground-muted);
    flex-shrink: 0;
    opacity: 0.5;
}

#input_url {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Nunito', sans-serif;
    font-size: 16px; /* Prevents iOS zoom on focus */
    color: var(--foreground);
    padding: 1rem 0;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

#input_url::placeholder {
    color: var(--foreground-muted);
    opacity: 0.6;
}

/* Buttons */
.btn-convert {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: var(--primary);
    color: #ffffff;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-convert:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.4);
}

.btn-convert:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-convert:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-convert:hover:not(:disabled) .btn-icon {
    transform: translateX(3px);
}

/* Spinning animation */
.spinning {
    animation: spin 1s linear infinite;
}

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

/* Shake animation for invalid input */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* Progress Section */
.progress-section {
    width: 100%;
    margin-bottom: 1.5rem;
}

.progress-wrapper {
    width: 100%;
    height: 6px;
    background: var(--accent);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 9999px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.progress-message {
    font-size: 0.9rem;
    color: var(--foreground-muted);
    min-height: 1.5rem;
}

/* Feature Pills */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--foreground-muted);
    transition: all 0.3s ease;
}

.feature-pill:hover {
    border-color: var(--primary);
    color: var(--foreground);
    transform: translateY(-2px);
}

/* Recent Playlists */
.recent-playlists {
    margin-top: 3rem;
    width: 100%;
}

.recent-title {
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    text-align: center;
}

.recent-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.recent-card {
    display: flex;
    flex-direction: column;
    background: var(--background-elevated);
    border: 1px solid var(--border);
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    overflow: hidden;
}

.recent-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.recent-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--accent);
    position: relative;
}

.recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-card:hover .recent-image img {
    transform: scale(1.05);
}

.recent-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground-muted);
    background: linear-gradient(135deg, var(--accent) 0%, var(--border) 100%);
}

.recent-placeholder svg {
    width: 40%;
    height: 40%;
    opacity: 0.5;
}

.recent-info {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recent-name {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.recent-tracks {
    font-size: 0.75rem;
    color: var(--foreground-muted);
}

/* Mobile: Stack cards vertically but keep images prominent */
@media (max-width: 600px) {
    .recent-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recent-card {
        flex-direction: row;
        align-items: center;
    }
    
    .recent-image {
        width: 80px;
        height: 80px;
        aspect-ratio: auto;
        flex-shrink: 0;
        border-radius: 0.75rem;
        margin: 0.75rem;
    }
    
    .recent-info {
        padding: 0.75rem;
        padding-left: 0;
        flex: 1;
        min-width: 0;
    }
    .recent-name {
        font-size: 0.9rem;
    }
    
    .recent-tracks {
        font-size: 0.8rem;
    }
}

/* Skeleton Loading */
.skeleton {
    pointer-events: none;
}

.shimmer {
    background: linear-gradient(
        90deg,
        var(--accent) 0%,
        var(--background-elevated) 50%,
        var(--accent) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

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

.skeleton .recent-image {
    background: var(--accent);
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
    width: 80%;
}

.skeleton-text.short {
    width: 50%;
    height: 12px;
    margin-top: 6px;
}

/* GitHub Link */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding: 0.625rem 1.25rem;
    color: var(--foreground-muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.github-link:hover {
    color: var(--foreground);
}

.github-link svg {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.github-link:hover svg {
    opacity: 1;
}

/* ===========================================
   PHASE 2: Selection UI
   =========================================== */

#phase-selection {
    justify-content: flex-start;
    padding-top: 1.5rem;
}

.selection-wrapper {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

/* Selection Header */
.selection-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--foreground-muted);
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: var(--foreground-muted);
    color: var(--foreground);
}

.playlist-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.playlist-thumb {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.playlist-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
}

.track-count {
    color: var(--foreground-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--background-elevated);
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--foreground-muted);
}

.stat-high { border-color: rgba(29, 185, 84, 0.3); }
.stat-medium { border-color: rgba(251, 191, 36, 0.3); }
.stat-none { border-color: var(--border); }

/* Bulk Actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-bulk {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-bulk:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-bulk-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground-muted);
}

.btn-bulk-secondary:hover {
    background: var(--accent);
    border-color: var(--foreground-muted);
    color: var(--foreground);
}

.selected-count {
    margin-left: auto;
    color: var(--foreground-muted);
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    background: var(--background-elevated);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-muted);
    background: rgba(29, 185, 84, 0.05);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.pagination-btn.nav-btn {
    width: auto;
    padding: 0 1rem;
    gap: 0.375rem;
}

.pagination-info {
    color: var(--foreground-muted);
    font-size: 0.875rem;
    padding: 0 0.75rem;
}

/* Track List */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Track Card */
.track-card {
    display: grid;
    grid-template-columns: 1fr auto 1.5fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-elevated);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.track-card:hover {
    border-color: var(--primary-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.track-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-soft);
}

/* Track Info (Original & Remix) */
.track-original,
.track-remix {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0; /* Allow flex children to shrink below content size */
    overflow: hidden;
}

.track-original {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.track-art {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.track-art-small {
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    object-fit: cover;
    flex-shrink: 0;
}

.track-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
    flex: 1;
    overflow: hidden;
}

.track-name {
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    word-break: break-word;
}

.track-artists {
    font-size: 0.8rem;
    color: var(--foreground-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Arrow */
.track-arrow {
    color: var(--foreground-muted);
    opacity: 0.5;
}

/* Remix Option */
.remix-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
    overflow: hidden;
}

.remix-option .track-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.remix-option:hover {
    background: rgba(29, 185, 84, 0.05);
    border-color: var(--primary-muted);
}

.remix-option.selected {
    background: rgba(29, 185, 84, 0.1);
    border-color: var(--primary);
}

.remix-checkbox,
.remix-radio {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* Preview Button */
.btn-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}

.btn-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4);
}

.btn-preview.playing {
    background: var(--primary);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

/* Spotify link button (when no preview available) */
.btn-preview.btn-spotify-link {
    background: #1DB954;
    text-decoration: none;
}

.btn-preview.btn-spotify-link:hover {
    background: #1ed760;
    transform: scale(1.1);
}

.btn-preview-small {
    width: 28px;
    height: 28px;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
    }
    50% {
        box-shadow: 0 2px 16px rgba(29, 185, 84, 0.6);
    }
}

/* Confidence Badge */
.confidence-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.confidence-high {
    background: rgba(29, 185, 84, 0.15);
    color: var(--primary);
}

.confidence-medium {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.confidence-low {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* More Options */
.btn-more-options {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--foreground-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-more-options:hover {
    border-color: var(--primary-muted);
    color: var(--primary);
}

.btn-more-options.expanded svg {
    transform: rotate(180deg);
}

.btn-more-options svg {
    transition: transform 0.2s ease;
}

.more-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}

/* No Match */
.no-match {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--foreground-muted);
    font-size: 0.875rem;
}

.no-match-icon {
    font-size: 1.25rem;
}

/* Create Section */
.create-section {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--background) 80%, transparent);
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: #ffffff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-float);
}

.btn-create:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(29, 185, 84, 0.4);
}

.btn-create:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--secondary);
}

/* ===========================================
   PHASE 3: Success
   =========================================== */

.success-wrapper {
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: rgba(29, 185, 84, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0 auto 2rem;
    animation: success-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes success-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.success-message {
    color: var(--foreground-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-spotify {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #ffffff;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.btn-spotify:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-float);
}

.btn-new {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--foreground-muted);
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-new:hover {
    border-color: var(--foreground-muted);
    color: var(--foreground);
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 768px) {
    .phase-container {
        padding: 1.5rem;
    }
    
    .selection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .track-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .track-arrow {
        display: none;
    }
    
    .track-original {
        padding-bottom: 0.75rem;
        border-bottom: 1px dashed var(--border);
    }
    
    .bulk-actions {
        justify-content: center;
    }
    
    .selected-count {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 640px) {
    .wrapper {
        max-width: 100%;
    }
    
    .brand-header {
        margin-bottom: 2rem;
    }
    
    .search-card {
        border-radius: 1.5rem;
        padding: 0.375rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 0;
    }
    
    .input-wrapper {
        width: 100%;
        padding: 0 0.75rem;
    }
    
    #input_url {
        width: 100%;
        padding: 0.875rem 0;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .btn-convert {
        width: 100%;
        justify-content: center;
        margin: 0.5rem;
        padding: 0.875rem 1.5rem;
    }
    
    .features {
        gap: 0.5rem;
    }
    
    .feature-pill {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .blob-1 {
        width: 200px;
        height: 200px;
        top: -50px;
        left: -30px;
    }
    
    .blob-2 {
        width: 180px;
        height: 180px;
        bottom: -30px;
        right: -30px;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .btn-bulk {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Mobile touch stability */
    .container,
    .phase-container {
        touch-action: pan-y;
    }
}

/* ===========================================
   FLOATING MUSIC NOTES
   =========================================== */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    top: 0;
    left: 0;
}

.note {
    position: absolute;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.15;
    animation: float-note 6s ease-in-out infinite;
}

.note-1 {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.note-2 {
    top: 25%;
    right: 12%;
    animation-delay: -2s;
    font-size: 1.5rem;
}

.note-3 {
    bottom: 25%;
    left: 15%;
    animation-delay: -4s;
}

@keyframes float-note {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
        opacity: 0.3;
    }
}

/* ===========================================
   FLOATING BACKGROUND NOTES
   =========================================== */
.floating-notes-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-note {
    position: absolute;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.08;
    animation: float-bg-note 8s ease-in-out infinite;
}

.bg-note-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    font-size: 4rem;
}

.bg-note-2 {
    top: 20%;
    right: 8%;
    animation-delay: -1.5s;
    font-size: 2.5rem;
}

.bg-note-3 {
    top: 45%;
    left: 3%;
    animation-delay: -3s;
    font-size: 3rem;
}

.bg-note-4 {
    top: 60%;
    right: 5%;
    animation-delay: -4.5s;
    font-size: 3.5rem;
}

.bg-note-5 {
    bottom: 25%;
    left: 8%;
    animation-delay: -6s;
    font-size: 2rem;
}

.bg-note-6 {
    bottom: 15%;
    right: 10%;
    animation-delay: -7s;
    font-size: 2.5rem;
}

@keyframes float-bg-note {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
        opacity: 0.08;
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
        opacity: 0.15;
    }
}

/* ===========================================
   SELECTION PAGE STYLES
   =========================================== */
.selection-wrapper {
    max-width: 900px;
    width: 100%;
}

.create-section {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 640px) {
    .floating-notes-bg {
        display: none;
    }
}
