:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #E7273B;
    --primary-color: #E7273B;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f4f4f5;
    
    --primary-color: #F56776;
    --secondary-color: #F56776;
    --text-color: var(--tg-theme-text-color);
    --bg-color: var(--tg-theme-bg-color);
    --secondary-bg: var(--tg-theme-secondary-bg-color);
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    z-index: 9999;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--secondary-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Content */
#content {
    flex: 1;
    padding-bottom: 70px;
}

#router-view {
    min-height: calc(100vh - 70px);
    padding: 16px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    height: 60px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.nav-item {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: var(--tg-theme-hint-color);
    transition: color 0.2s;
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:active {
    opacity: 0.7;
}

.nav-item-create {
    position: relative;
}

.nav-item-create .nav-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--tg-theme-button-text-color);
    box-shadow: var(--shadow);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--tg-theme-button-text-color);
}

.btn-primary:active {
    opacity: 0.8;
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-color);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Cards */
.card {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Header */
.header {
    padding: 16px 0;
    margin-bottom: 16px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
}

/* Song item */
.song-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--secondary-bg);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.song-item:active {
    transform: scale(0.98);
}

.song-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--border-color);
    flex-shrink: 0;
    object-fit: cover;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-meta {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-color);
    color: var(--text-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--secondary-bg);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-button {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--primary-color);
}

.tab-button:active {
    opacity: 0.8;
}

/* Characteristics */
.char-group {
    margin-bottom: 20px;
}

.char-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.char-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--secondary-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.char-option input[type="checkbox"] {
    margin: 0;
}

.char-option:has(input:checked) {
    background: var(--primary-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--primary-color);
}

.char-option input[type="checkbox"]:checked {
    accent-color: white;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

/* Wizard Styles */
.wizard-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    padding-bottom: 20px; /* Reduced since footer is not fixed */
}

.wizard-header {
    padding: 16px;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
}

.wizard-header h1 {
    font-size: 24px;
    margin-bottom: 16px;
}

.wizard-progress {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.wizard-steps {
    display: flex;
    justify-content: space-around;
    gap: 8px;
}

.wizard-steps .step {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    padding: 4px;
    border-bottom: 2px solid transparent;
}

.wizard-steps .step.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.wizard-content {
    /* flex: 1; */
    padding: 16px;
    padding-bottom: 16px; /* Removed extra padding for fixed footer */
    overflow-y: auto;
}

.wizard-footer {
    /* Removed: position: fixed, bottom, left, right, max-width, margin */
    /* Footer now flows with content */
    display: flex;
    gap: 12px;
    padding: 16px;
    margin-bottom: 220px;
    /* background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); */
    /* Removed z-index: 99 - no longer needs stacking context */
}

/* Creation Type Cards */
.creation-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.creation-type-card {
    padding: 16px;
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.creation-type-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.creation-type-card.selected {
    border-color: var(--primary-color);
    background: rgba(36, 129, 204, 0.1);
}

.type-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.type-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.type-desc {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
}

/* Track Type Options */
.track-types {
    display: flex;
    gap: 12px;
}

.track-type-option {
    flex: 1;
    padding: 16px;
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-type-option input[type="radio"] {
    display: none;
}

.track-type-option.selected {
    border-color: var(--primary-color);
    background: rgba(36, 129, 204, 0.1);
}

.track-type-option span {
    font-size: 16px;
    font-weight: 500;
}

/* Lyrics Modes */
.lyrics-modes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lyrics-modes .btn {
    flex: 1;
    min-width: 100px;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 12px;
}

.button-group .btn {
    flex: 1;
}

/* Review Section */
.review-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.review-section:last-child {
    border-bottom: none;
}

.review-section h4 {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 8px;
}

.review-section p {
    font-size: 16px;
}

.lyrics-preview {
    padding: 12px;
    background: var(--secondary-bg);
    border-radius: 8px;
    font-size: 14px;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}

.review-cost {
    text-align: center;
    padding: 16px;
    background: rgba(36, 129, 204, 0.1);
    border-radius: 12px;
}

.cost-info {
    font-size: 16px;
}

.cost-info strong {
    color: var(--primary-color);
    font-size: 20px;
}

/* Char options selected state */
.char-option.selected {
    background: var(--primary-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--primary-color);
}

.mt-24 {
    margin-top: 24px;
}

/* Home Component Styles */
.home-container {
    padding: 0 0 80px 0;
}

.hero-section {
    text-align: center;
    padding: 40px 20px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 0 0 24px 24px;
}

.hero-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

/* User Stats Card */
.user-stats-card {
    display: flex;
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(36, 129, 204, 0.1) 0%, rgba(36, 129, 204, 0.05) 100%);
    border-radius: 12px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 8px;
}

/* Section Header */
.section-header {
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(36, 129, 204, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.action-card:active {
    transform: scale(0.98);
}

.action-card:active::before {
    opacity: 1;
}

.action-card-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(36, 129, 204, 0.3);
}

.action-card-primary .action-arrow {
    color: white;
}

.action-icon {
    font-size: 40px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    flex-shrink: 0;
}

.action-card-primary .action-icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-content {
    flex: 1;
    min-width: 0;
}

.action-content h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-content p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.4;
}

.action-arrow {
    font-size: 24px;
    font-weight: 300;
    color: var(--tg-theme-hint-color);
    transition: transform 0.3s;
}

.action-card:active .action-arrow {
    transform: translateX(4px);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
}

.feature-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
}

.feature-card p {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    line-height: 1.4;
}

/* Profile Component Styles */
.profile-container {
    padding: 0 0 80px 0;
}

.profile-hero {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 0 0 24px 24px;
    margin: 0 -16px 24px;
}

.profile-avatar {
    margin-bottom: 16px;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-username {
    font-size: 16px;
    opacity: 0.9;
}

/* Profile Stats Grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.profile-stat-card {
    background: white;
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.profile-stat-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon-large {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value-large {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label-large {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
    font-weight: 500;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-action-btn:active {
    transform: scale(0.98);
}

.profile-action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(36, 129, 204, 0.3);
}

.action-btn-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
}

.profile-action-btn.primary .action-btn-icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn-content {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.action-btn-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.action-btn-desc {
    display: block;
    font-size: 13px;
    opacity: 0.8;
}

.action-btn-arrow {
    font-size: 24px;
    font-weight: 300;
    color: var(--tg-theme-hint-color);
    transition: transform 0.3s;
}

.profile-action-btn.primary .action-btn-arrow {
    color: white;
}

.profile-action-btn:active .action-btn-arrow {
    transform: translateX(4px);
}

/* Info Cards (Achievements) */
.profile-info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.achievement-icon {
    font-size: 36px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(36, 129, 204, 0.1) 0%, rgba(36, 129, 204, 0.05) 100%);
    border-radius: 14px;
    flex-shrink: 0;
}

.achievement-content {
    flex: 1;
    min-width: 0;
}

.achievement-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.achievement-desc {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    line-height: 1.4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

/* Loading Shimmer */
.loading-shimmer {
    height: 40px;
    background: linear-gradient(
        90deg,
        var(--secondary-bg) 0%,
        #e8e8e8 50%,
        var(--secondary-bg) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* Generate Music Flow Styles */
.lyrics-step {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-header-card {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(36, 129, 204, 0.1) 0%, rgba(36, 129, 204, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.step-header-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.step-subtitle {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--secondary-bg);
    border-radius: 12px;
}

.mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.mode-btn:active {
    transform: scale(0.98);
}

.mode-btn.active {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(36, 129, 204, 0.2);
}

.mode-icon {
    font-size: 24px;
}

.mode-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.mode-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    border-radius: 10px;
    font-weight: 600;
}

.mode-count {
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 600;
}

/* Content Cards */
.manual-lyrics-card,
.ai-generate-card {
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.label-icon {
    font-size: 18px;
    margin-right: 8px;
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
}

.textarea-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.char-count {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
}

/* AI Cost Info */
.ai-cost-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(36, 129, 204, 0.1);
    border-radius: 12px;
    font-size: 14px;
    margin: 16px 0;
}

.cost-icon {
    font-size: 20px;
}

.ai-cost-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Current Lyrics Card */
.current-lyrics-card {
    padding: 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border-radius: 16px;
    border: 2px solid #4caf50;
}

.lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.lyrics-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.lyrics-icon {
    font-size: 32px;
}

.lyrics-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.lyrics-meta {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.btn-icon:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.2);
}

.lyrics-preview {
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
}

/* Saved Lyrics Grid */
.saved-lyrics-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saved-lyric-card {
    padding: 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.saved-lyric-card:active {
    transform: scale(0.98);
}

.saved-lyric-card.selected {
    border-color: var(--primary-color);
    background: rgba(36, 129, 204, 0.05);
    box-shadow: 0 4px 12px rgba(36, 129, 204, 0.2);
}

.lyric-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lyric-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 12px;
    flex-shrink: 0;
}

.lyric-info {
    flex: 1;
    min-width: 0;
}

.lyric-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lyric-meta {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
}

.selected-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.lyric-preview {
    padding: 12px;
    background: var(--secondary-bg);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-theme-hint-color);
}

/* Empty State Card */
.empty-state-card {
    text-align: center;
    padding: 48px 20px;
    background: white;
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}

/* My Songs Component Styles */
.my-songs-container {
    padding: 0 0 80px 0;
}

.page-header {
    padding: 24px 16px 16px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 0 16px;
}

.song-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.song-card:active {
    transform: scale(0.98);
}

.song-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: var(--border-color);
    background-size: cover;
    background-position: center;
}

.song-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.song-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.song-card:hover .song-card-overlay,
.song-card:active .song-card-overlay {
    opacity: 1;
}

.song-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

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

.song-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.song-card-info {
    padding: 12px;
}

.song-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.song-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.song-menu-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--tg-theme-hint-color);
    flex-shrink: 0;
}

.song-card-meta {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-card-date {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
}

/* Context Menu */
.song-context-menu {
    position: absolute;
    top: 40px;
    right: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    min-width: 150px;
    overflow: hidden;
}

.menu-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: var(--secondary-bg);
}

.menu-item:active {
    background: var(--border-color);
}

.menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-item-danger {
    color: #e74c3c;
}

.menu-icon {
    font-size: 16px;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 60px; /* Above bottom-nav */
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 98; /* Below bottom-nav (100), above content */
    transition: transform 0.3s ease;
}

.music-player.hidden {
    transform: translateY(100%);
}

.player-content {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border-color);
    position: absolute;
    top: 12px;
    left: 16px;
}

.player-info {
    margin-left: 60px;
    min-width: 0;
}

.player-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-artist {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.player-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.player-btn:active {
    transform: scale(0.9);
}

.player-play-btn {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    font-size: 24px;
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-time {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
    min-width: 35px;
    text-align: center;
}

.player-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.1s linear;
}

.player-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--secondary-bg);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-close:active {
    background: var(--border-color);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 40px 20px;
}

.error-state p {
    margin-bottom: 16px;
    color: #e74c3c;
}

/* Song Version Selection Cards */
.song-version-card {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.song-version-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.song-version-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(36, 129, 204, 0.2);
}

.song-version-card:active {
    transform: scale(0.98);
}

.song-version-card .song-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: var(--border-color);
    background-size: cover;
    background-position: center;
}

.song-version-card .song-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.song-version-card .song-card-info {
    padding: 12px;
    background: white;
}

/* Review Song Card */
.review-song-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--secondary-bg);
    border-radius: 12px;
}

.review-song-placeholder {
    width: 60px;
    height: 60px;
    background: var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.review-song-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.review-song-meta {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 28px;
    background: var(--border-color);
    border-radius: 14px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-weight: 500;
    color: var(--text-color);
}

/* Disabled Card */
.disabled-card {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.disabled-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    pointer-events: none;
}

/* Payment Component Styles */
.payment-container {
    padding: 0 0 80px 0;
}

.payment-method-selector {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.method-btn:active {
    transform: scale(0.98);
}

.method-btn.active {
    border-color: var(--primary-color);
    background: rgba(36, 129, 204, 0.05);
    box-shadow: 0 4px 12px rgba(36, 129, 204, 0.2);
}

.method-icon {
    font-size: 32px;
}

.method-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

/* Payment Method Picker */
.payment-method-picker {
    margin: 24px 0;
    padding: 0 16px;
}

.picker-track {
    position: relative;
    display: flex;
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.picker-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 6px);
    height: calc(100% - 8px);
    background: var(--primary-color, var(--primary-color));
    border-radius: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}

.picker-indicator[data-method="card"] {
    transform: translateX(100%);
}

.picker-option {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
    min-height: 64px;
}

.picker-option:active {
    transform: scale(0.98);
}

.picker-icon {
    font-size: 24px;
    transition: transform 0.2s ease;
}

.picker-option.active .picker-icon {
    transform: scale(1.1);
}

.picker-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #000);
    transition: color 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.picker-option.active .picker-label {
    color: var(--tg-theme-button-text-color, #fff);
    font-weight: 600;
}

/* Payment Container */
.payment-container {
    padding: 16px;
    padding-bottom: 80px;
}

/* Payment Header */
.payment-header {
    text-align: center;
    margin-bottom: 24px;
}

.payment-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
    margin: 0 0 8px 0;
}

.payment-subtitle {
    font-size: 15px;
    color: var(--tg-theme-hint-color);
    margin: 0;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

/* Package Card */
.package-card {
    position: relative;
    background: var(--tg-theme-bg-color);
    border: 2px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.package-card:active {
    transform: translateY(0);
}

.package-card.featured {
    border-color: var(--primary-color, var(--secondary-color));
    box-shadow: 0 2px 8px rgba(51, 144, 236, 0.2);
}

/* Package Badge */
.package-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.badge-try {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.badge-popular {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.badge-best {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.badge-fan {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.badge-rock {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* Package Content */
.package-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.package-credits {
    font-size: 24px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
    margin: 4px 0;
}

.package-credits-label {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 12px;
}

/* Package Price */
.package-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color, var(--secondary-color));
}

.price-currency {
    font-size: 18px;
}

.price-value {
    font-size: 20px;
}

/* Payment Info */
.payment-info {
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
}

.payment-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
    margin: 0 0 16px 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
    color: var(--tg-theme-text-color);
}

.info-item:not(:last-child) {
    border-bottom: 1px solid var(--tg-theme-bg-color);
}

.info-icon {
    font-size: 20px;
}

/* Payment Legal */
.payment-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    font-size: 13px;
    color: var(--tg-theme-hint-color);
}

.legal-link {
    color: var(--tg-theme-link-color, var(--secondary-color));
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.legal-link:hover {
    opacity: 0.7;
}

.legal-divider {
    color: var(--tg-theme-hint-color);
}

/* Payment Back Button */
.payment-back-button {
    padding: 16px 16px 0;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--tg-theme-link-color, var(--secondary-color));
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-back:hover {
    opacity: 0.7;
}

.btn-back:active {
    opacity: 0.5;
}

.back-icon {
    font-size: 20px;
    line-height: 1;
}

/* Lyrics Page Styles */
.lyrics-page {
    padding: 16px;
    padding-bottom: 80px;
}

.page-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
    margin: 0 0 8px 0;
}

.page-subtitle {
    font-size: 15px;
    color: var(--tg-theme-hint-color);
    margin: 0;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mode-btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mode-btn:hover {
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--primary-color, var(--secondary-color));
    color: var(--tg-theme-button-text-color, #fff);
    border-color: var(--primary-color, var(--secondary-color));
}

.mode-icon {
    font-size: 24px;
}

.mode-label {
    font-size: 13px;
    font-weight: 500;
}

.mode-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary-color, var(--secondary-color));
    color: var(--tg-theme-button-text-color, #fff);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.mode-btn.active .mode-count {
    background: var(--tg-theme-button-text-color, #fff);
    color: var(--primary-color, var(--secondary-color));
}

.mode-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(255, 193, 7, 0.2);
    color: #f39c12;
    border-radius: 6px;
    font-weight: 600;
}

.mode-btn.active .mode-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--tg-theme-button-text-color, #fff);
}

/* Saved Lyrics List */
.saved-lyrics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lyric-card {
    background: var(--tg-theme-bg-color);
    border: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s ease;
}

.lyric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lyric-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.lyric-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.lyric-info {
    flex: 1;
    min-width: 0;
}

.lyric-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lyric-meta {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    margin: 0;
}

.lyric-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
}

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

.lyrics-preview {
    font-size: 14px;
    color: var(--tg-theme-text-color);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Manual Lyrics Form */
.manual-lyrics-form,
.ai-generate-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-text-color);
    margin-bottom: 8px;
}

.label-icon {
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: var(--tg-theme-bg-color);
    border: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 12px;
    font-size: 15px;
    color: var(--tg-theme-text-color);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color, var(--secondary-color));
}

.form-textarea {
    width: 100%;
    padding: 12px;
    background: var(--tg-theme-bg-color);
    border: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 12px;
    font-size: 15px;
    color: var(--tg-theme-text-color);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color, var(--secondary-color));
}

.textarea-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.char-count {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
}

.form-hint {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    margin-top: 8px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

/* AI Cost Info */
.ai-cost-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(51, 144, 236, 0.1);
    border-radius: 12px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--tg-theme-text-color);
}

.cost-icon {
    font-size: 18px;
}

/* Empty State */
.empty-state-card {
    text-align: center;
    padding: 48px 24px;
    background: var(--tg-theme-bg-color);
    border: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 16px;
}

/* My Songs Component Styles */
.my-songs-container {
    padding: 0 0 80px 0;
}

.page-header {
    padding: 24px 16px 16px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 0 16px;
}

.song-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.song-card:active {
    transform: scale(0.98);
}

.song-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: var(--border-color);
    background-size: cover;
    background-position: center;
}

.song-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.song-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.song-card:hover .song-card-overlay,
.song-card:active .song-card-overlay {
    opacity: 1;
}

.song-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

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

.song-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.song-card-info {
    padding: 12px;
}

.song-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.song-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.song-menu-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--tg-theme-hint-color);
    flex-shrink: 0;
}

.song-card-meta {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-card-date {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
}

/* Context Menu */
.song-context-menu {
    position: absolute;
    top: 40px;
    right: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    min-width: 150px;
    overflow: hidden;
}

.menu-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: var(--secondary-bg);
}

.menu-item:active {
    background: var(--border-color);
}

.menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-item-danger {
    color: #e74c3c;
}

.menu-icon {
    font-size: 16px;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 60px; /* Above bottom-nav */
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 98; /* Below bottom-nav (100), above content */
    transition: transform 0.3s ease;
}

.music-player.hidden {
    transform: translateY(100%);
}

.player-content {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border-color);
    position: absolute;
    top: 12px;
    left: 16px;
}

.player-info {
    margin-left: 60px;
    min-width: 0;
}

.player-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-artist {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.player-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.player-btn:active {
    transform: scale(0.9);
}

.player-play-btn {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    font-size: 24px;
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-time {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
    min-width: 35px;
    text-align: center;
}

.player-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.1s linear;
}

.player-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--secondary-bg);
    border-radius: 50;
}