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

:root {
    --bg: #0b0f15;
    --bg-soft: #11161f;
    --card: #101620;
    --card-strong: #0f1722;
    --muted: #9aa6b2;
    --text: #e5e7eb;
    --accent: #7c5cff;
    --accent-strong: #3dd5c3;
    --accent-soft: rgba(124, 92, 255, 0.16);
    --success: #2fbf95;
    --danger: #f97373;
    --border: rgba(148, 163, 184, 0.18);
}

:root[data-theme="light"] {
    --bg: #f4f7fb;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --card-strong: #f8fafc;
    --muted: #5f6b7a;
    --text: #0f172a;
    --accent: #6d5af8;
    --accent-strong: #13b8a7;
    --accent-soft: rgba(109, 90, 248, 0.12);
    --success: #0f9f78;
    --danger: #dc4f4f;
    --border: rgba(100, 116, 139, 0.24);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: radial-gradient(circle at 20% 0%, #151c28 0%, #0b0f15 55%, #070a10 100%);
    min-height: 100vh;
    padding: 24px;
    color: var(--text);
}

body[data-theme="light"] {
    background: radial-gradient(circle at 20% 0%, #edf2fb 0%, #f6f8fc 55%, #eef3fb 100%);
}

body.music-brand-bg {
    background:
        linear-gradient(180deg, rgba(3, 9, 26, 0.72) 0%, rgba(3, 9, 26, 0.78) 100%),
        url('/bg/music-desktop.png') center center / cover no-repeat fixed;
}

body.music-brand-bg[data-theme="light"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.24) 100%),
        url('/bg/music-desktop-light.png') center center / cover no-repeat fixed;
}

body.music-brand-bg.tg-view,
body.music-brand-bg.tg-mobile {
    background:
        linear-gradient(180deg, rgba(3, 9, 26, 0.64) 0%, rgba(3, 9, 26, 0.76) 100%),
        url('/bg/music-mobile.png') center center / cover no-repeat;
    background-attachment: scroll;
}

body.music-brand-bg.tg-view[data-theme="light"],
body.music-brand-bg.tg-mobile[data-theme="light"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.2) 100%),
        url('/bg/music-mobile-light.png') center center / cover no-repeat;
    background-attachment: scroll;
}

@media (max-width: 900px) {
    body.music-brand-bg:not(.tg-view) {
        background:
            linear-gradient(180deg, rgba(3, 9, 26, 0.64) 0%, rgba(3, 9, 26, 0.76) 100%),
            url('/bg/music-mobile.png') center center / cover no-repeat;
        background-attachment: scroll;
    }

    body.music-brand-bg[data-theme="light"]:not(.tg-view) {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.2) 100%),
            url('/bg/music-mobile-light.png') center center / cover no-repeat;
        background-attachment: scroll;
    }
}

body.photo-view {
    background:
        linear-gradient(180deg, rgba(3, 9, 26, 0.72) 0%, rgba(3, 9, 26, 0.78) 100%),
        url('/bg/photo-desktop.png') center center / cover no-repeat fixed;
}

body.photo-view[data-theme="light"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.24) 100%),
        url('/bg/photo-desktop-light.png') center center / cover no-repeat fixed;
}

body.photo-view.tg-view,
body.photo-view.tg-mobile {
    background:
        linear-gradient(180deg, rgba(3, 9, 26, 0.64) 0%, rgba(3, 9, 26, 0.76) 100%),
        url('/bg/photo-mobile.png') center center / cover no-repeat;
    background-attachment: scroll;
}

body.photo-view.tg-view[data-theme="light"],
body.photo-view.tg-mobile[data-theme="light"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.2) 100%),
        url('/bg/photo-mobile-light.png') center center / cover no-repeat;
    background-attachment: scroll;
}

@media (max-width: 900px) {
    body.photo-view:not(.tg-view) {
        background:
            linear-gradient(180deg, rgba(3, 9, 26, 0.64) 0%, rgba(3, 9, 26, 0.76) 100%),
            url('/bg/photo-mobile.png') center center / cover no-repeat;
        background-attachment: scroll;
    }

    body.photo-view[data-theme="light"]:not(.tg-view) {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.2) 100%),
            url('/bg/photo-mobile-light.png') center center / cover no-repeat;
        background-attachment: scroll;
    }
}

body.photo-view.video-page {
    background:
        linear-gradient(180deg, rgba(3, 9, 26, 0.55) 0%, rgba(3, 9, 26, 0.65) 100%),
        url('/bg/video-desktop.png') center center / cover no-repeat fixed;
}

body.photo-view.video-page[data-theme="light"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.18) 100%),
        url('/bg/video-desktop-light.png') center center / cover no-repeat fixed;
}

body.photo-view.video-page.tg-view,
body.photo-view.video-page.tg-mobile {
    background:
        linear-gradient(180deg, rgba(3, 9, 26, 0.5) 0%, rgba(3, 9, 26, 0.65) 100%),
        url('/bg/video-mobile.png') center center / cover no-repeat;
    background-attachment: scroll;
}

body.photo-view.video-page.tg-view[data-theme="light"],
body.photo-view.video-page.tg-mobile[data-theme="light"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.16) 100%),
        url('/bg/video-mobile-light.png') center center / cover no-repeat;
    background-attachment: scroll;
}

@media (max-width: 900px) {
    body.photo-view.video-page:not(.tg-view) {
        background:
            linear-gradient(180deg, rgba(3, 9, 26, 0.5) 0%, rgba(3, 9, 26, 0.65) 100%),
            url('/bg/video-mobile.png') center center / cover no-repeat;
        background-attachment: scroll;
    }

    body.photo-view.video-page[data-theme="light"]:not(.tg-view) {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.16) 100%),
            url('/bg/video-mobile-light.png') center center / cover no-repeat;
        background-attachment: scroll;
    }
}

body[data-theme="light"] .header,
body[data-theme="light"] .top-menu,
body[data-theme="light"] .footer-banner {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .section,
body[data-theme="light"] .sidebar-panel,
body[data-theme="light"] .song-card,
body[data-theme="light"] .main-block,
body[data-theme="light"] .track-card,
body[data-theme="light"] #resultContent,
body[data-theme="light"] .progress-container,
body[data-theme="light"] .settings-card,
body[data-theme="light"] .promo-card,
body[data-theme="light"] .auth-modal-card,
body[data-theme="light"] .player,
body[data-theme="light"] .lyrics-box,
body[data-theme="light"] .photo-model-picker,
body[data-theme="light"] .photo-result-panel,
body[data-theme="light"] .photo-card {
    background: #ffffff;
}

body[data-theme="light"] .panel-item,
body[data-theme="light"] .photo-upload,
body[data-theme="light"] .mobile-track-item,
body[data-theme="light"] .mobile-news-item,
body[data-theme="light"] .photo-upload-item,
body[data-theme="light"] .photo-mini,
body[data-theme="light"] .news-card,
body[data-theme="light"] textarea,
body[data-theme="light"] input,
body[data-theme="light"] .history-filters select,
body[data-theme="light"] .history-filters input,
body[data-theme="light"] .settings-select {
    background: #f8fafc;
    color: var(--text);
}

body[data-theme="light"] .brand-title h1,
body[data-theme="light"] .section h2,
body[data-theme="light"] .section h3,
body[data-theme="light"] .settings-title {
    color: #0f172a;
}

body[data-theme="light"] .back-btn {
    background: #e2e8f0;
    color: #334155;
}

body[data-theme="light"] .back-btn:hover {
    background: #cbd5e1;
}

body[data-theme="light"] .top-menu .menu-btn {
    background: #eef2ff;
    color: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

body[data-theme="light"] .top-menu .menu-btn:hover {
    background: #e0e7ff;
    border-color: rgba(99, 102, 241, 0.35);
}

body[data-theme="light"] .top-menu .menu-btn.active {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: rgba(59, 130, 246, 0.45);
}

body[data-theme="light"] .admin-btn {
    background: #e8edff;
    border-color: rgba(99, 102, 241, 0.34);
    color: #312e81;
}

body[data-theme="light"] .admin-btn:hover {
    background: #dde5ff;
    border-color: rgba(99, 102, 241, 0.46);
}

body[data-theme="light"] .admin-item {
    background: #f8fafc;
    border-color: rgba(100, 116, 139, 0.24);
    color: #0f172a;
}

body[data-theme="light"] .panel-btn {
    color: #475569;
}

body[data-theme="light"] .glow-top {
    color: #8b6f2a;
    text-shadow: none;
}

body[data-theme="light"] .glow-latest {
    color: #3f5f9a;
    text-shadow: none;
}

body[data-theme="light"] .player {
    background: #f8fafc;
    border-color: rgba(100, 116, 139, 0.28);
}

body[data-theme="light"] .player-btn {
    background: #ffffff;
    color: #1e293b;
    border-color: rgba(100, 116, 139, 0.32);
}

body[data-theme="light"] .player-btn:hover {
    background: #eef2ff;
    border-color: rgba(99, 102, 241, 0.42);
}

body[data-theme="light"] .player .wave {
    background: rgba(99, 102, 241, 0.35);
}

body[data-theme="light"] .player.is-playing .wave {
    background: rgba(20, 184, 166, 0.75);
}

body[data-theme="light"] .player-time {
    color: #64748b;
}

body[data-theme="light"] .player-range {
    accent-color: #6366f1;
}

body[data-theme="light"] .photo-model-picker {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.24);
}

body[data-theme="light"] .photo-model-filter-panel {
    background: #f8fafc;
    border-color: rgba(100, 116, 139, 0.2);
}

body[data-theme="light"] .photo-filter-btn {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.26);
    color: #1e293b;
}

body[data-theme="light"] .photo-filter-btn:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: #eef2ff;
}

body[data-theme="light"] .photo-filter-btn.is-active {
    background: #e0e7ff;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.22);
}

body[data-theme="light"] .photo-model-picker-head input {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.26);
    color: #0f172a;
}

body[data-theme="light"] .photo-model-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-color: rgba(100, 116, 139, 0.22);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .photo-model-card:hover {
    border-color: rgba(100, 116, 139, 0.22);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .photo-model-card-title {
    color: #0f172a;
}

body[data-theme="light"] .photo-model-tag {
    background: #eef2ff;
    border-color: rgba(99, 102, 241, 0.35);
    color: #3730a3;
}

.app-shell {
    max-width: 1400px;
    margin: 0 auto;
}

.app-body {
    display: grid;
    grid-template-columns: 280px 1fr 360px;
    gap: 24px;
    align-items: start;
    overflow: visible;
}

.app-body > * {
    margin: 0;
}


.content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.footer-banner {
    margin: 32px auto 24px;
    max-width: 1400px;
    background: #0b111b;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 20px 60px rgba(4, 8, 15, 0.4);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: transparent;
    display: grid;
    place-items: center;
}

.footer-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
}

.footer-text {
    color: var(--muted);
    max-width: 520px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--text);
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.mobile-main {
    display: none;
    padding: 16px 0 8px;
    gap: 14px;
    flex-direction: row;
    overflow-x: auto;
    padding-left: 8px;
    padding-right: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.mobile-block {
    min-width: 85%;
    background: rgba(22, 26, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    scroll-snap-align: start;
}

.swipe-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.mobile-track-list,
.mobile-news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-track-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 18, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.mobile-track-cover {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.mobile-track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-track-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-track-title {
    font-size: 14px;
    font-weight: 700;
}

.mobile-track-meta {
    font-size: 12px;
    opacity: 0.7;
}

.mobile-news-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 18, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-news-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.mobile-news-body {
    font-size: 12px;
    opacity: 0.8;
}

.mobile-empty {
    font-size: 12px;
    opacity: 0.7;
}

body.tg-mobile .sidebar,
body.tg-mobile .sidebar-right,
body.tg-mobile .main-grid {
    display: none;
}

body.tg-mobile .mobile-main {
    display: flex;
}

body.tg-mobile #mainSection {
    display: none;
}

body.tg-mobile .app-body {
    display: block;
}

body.tg-mobile .content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

body.tg-mobile {
    padding: 12px;
}

body.tg-mobile .section {
    margin-top: 12px;
    padding: 14px;
}

body.tg-mobile .song-grid,
body.tg-mobile .news-grid {
    grid-template-columns: 1fr;
}

body.tg-mobile .song-cover {
    height: 120px;
}

body.tg-mobile #detailSection .song-cover,
body.tg-mobile #gallerySection .song-cover,
body.tg-mobile #videoDetailSection .song-cover,
body.tg-mobile #videoGallerySection .song-cover {
    height: auto;
    aspect-ratio: 1 / 1;
    background: #0b0f15;
}

body.tg-mobile #detailSection .song-cover img,
body.tg-mobile #gallerySection .song-cover img,
body.tg-mobile #videoDetailSection .song-cover img,
body.tg-mobile #videoGallerySection .song-cover img {
    height: auto;
    object-fit: contain;
}

body:not(.tg-mobile) #detailSection .song-cover,
body:not(.tg-mobile) #gallerySection .song-cover,
body:not(.tg-mobile) #videoDetailSection .song-cover,
body:not(.tg-mobile) #videoGallerySection .song-cover {
    height: auto;
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    background: transparent;
}

body:not(.tg-mobile) #detailSection .song-cover img,
body:not(.tg-mobile) #gallerySection .song-cover img,
body:not(.tg-mobile) #videoDetailSection .song-cover img,
body:not(.tg-mobile) #videoGallerySection .song-cover img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

#photoDetailSection .song-cover,
#videoDetailSection .song-cover {
    aspect-ratio: auto !important;
    max-width: none !important;
    height: auto !important;
    background: transparent;
}

#photoDetailSection .song-cover img,
#videoDetailSection .song-cover img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

#videoDetailSection .song-cover.video-detail-cover {
    min-height: 200px;
    overflow: visible;
}

#videoDetailSection .song-cover .video-cover-wrap {
    width: 100%;
    height: auto;
    min-height: 200px;
}

#videoDetailSection .song-cover .video-cover-wrap video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

body.tg-mobile .history-filters {
    gap: 6px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #0d131e;
    color: var(--text);
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: 16px;
}

.social-btn img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}

.social-btn:hover {
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.2);
    background: rgba(124, 92, 255, 0.16);
}

.promo-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(200px, 0.8fr);
    gap: 20px;
    background: #0d131e;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(4, 8, 15, 0.35);
}

.promo-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-left p {
    color: var(--muted);
    font-size: 14px;
}

.promo-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.promo-form input {
    flex: 1 1 220px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #0b111b;
    color: var(--text);
}

.promo-status {
    color: var(--muted);
    font-size: 13px;
    min-height: 20px;
}

#paymentStatus p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.promo-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(61, 213, 195, 0.2));
    border-radius: 16px;
    padding: 16px;
}

.promo-illustration {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(124, 92, 255, 0.25);
    display: grid;
    place-items: center;
    font-size: 22px;
}

.promo-highlight {
    color: var(--text);
    font-size: 14px;
}

.sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.sidebar-right {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: start;
    width: 100%;
    position: sticky;
    top: 24px;
    overflow: visible;
}



.sidebar-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    margin: 0;
    box-shadow: 0 16px 40px rgba(4, 8, 15, 0.35);
}

.sidebar-panel .song-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.sidebar-panel .song-card {
    padding: 10px;
    border-radius: 14px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-panel .song-cover {
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 240px;
    width: 100%;
    margin: 0 auto;
    background: transparent;
}

.sidebar-panel .song-title {
    font-size: 13px;
}

.sidebar-panel .song-meta {
    font-size: 11px;
}

.sidebar-panel .player {
    padding: 8px 10px;
}

.sidebar-panel .player-btn {
    width: 28px;
    height: 28px;
}

.sidebar-panel .song-info {
    width: 100%;
    overflow: hidden;
}

.sidebar-panel .song-info .song-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sidebar-panel .song-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
    width: 100%;
    max-width: 100%;
}

.sidebar-panel .song-cover img,
.sidebar-panel .song-cover .cover-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.sidebar-panel .player {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-panel .player audio {
    width: 100%;
    max-width: 100%;
}

.icon-btn.star-btn {
    color: #fbbf24;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.glow-top {
    color: #fbbf24;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.6), 0 0 18px rgba(251, 191, 36, 0.35);
}

.glow-latest {
    color: #7c5cff;
    text-shadow: 0 0 6px rgba(124, 92, 255, 0.6), 0 0 18px rgba(124, 92, 255, 0.35);
}

.panel-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.badge-new {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.2);
    color: #c4b5fd;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--card-strong);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-item:hover {
    border-color: rgba(124, 92, 255, 0.5);
    background: rgba(124, 92, 255, 0.12);
}

.panel-meta {
    color: var(--muted);
    font-size: 11px;
    margin-top: 6px;
}

.panel-empty {
    color: var(--muted);
    font-size: 13px;
}

.empty-tracks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.empty-tracks-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
    filter: grayscale(0.3);
}

.empty-tracks-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-tracks-hint {
    font-size: 13px;
    color: var(--muted);
    opacity: 0.8;
}


.hidden {
    display: none !important;
}

[data-auth-pending="1"] #loginSection,
[data-auth-pending="1"] #photoLoginSection,
[data-auth-pending="1"] #videoLoginSection {
    display: none !important;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px 22px;
    background: rgba(8, 12, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: transparent;
    display: grid;
    place-items: center;
}

.brand-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-title h1 {
    font-size: 22px;
    margin: 0;
    letter-spacing: 0.4px;
    color: #f9fafb;
}

.brand-title .brand-home-link {
    cursor: pointer;
}

.brand-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(61, 213, 195, 0.12);
    color: var(--accent-strong);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.top-link {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.top-link:hover {
    color: #e2e8f0;
    background: rgba(124, 92, 255, 0.16);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-public-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-btn {
    border: 1px solid var(--border);
    background: rgba(124, 92, 255, 0.14);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1f2937;
    border: 1px solid var(--border);
}

.balance {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.section {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: var(--card-strong);
    border: 1px solid var(--border);
}

.public-view .song-cover {
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
    background: #0b0f15;
}

.public-view .song-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.public-view .public-photo-cover {
    max-width: min(100%, 1320px);
    width: 100%;
    aspect-ratio: auto;
    height: min(72vh, 860px);
}

.public-view .public-photo-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

#detailSection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#detailSection #detailContent {
    margin: 0;
}

#detailSection .back-btn {
    margin-top: 0;
}

body.photo-view .section {
    margin-top: 0;
    padding: 16px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(4, 8, 15, 0.35);
}

#photoLoginSection.section,
#loginSection.section,
#videoLoginSection.section {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.photo-view .sidebar-panel,
body.photo-view .photo-generator,
body.photo-view .photo-model-picker,
body.photo-view .photo-result-panel,
body.photo-view .mobile-block {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

body.photo-view .sidebar-panel::before,
body.photo-view .photo-generator::before,
body.photo-view .photo-model-picker::before,
body.photo-view .photo-result-panel::before,
body.photo-view .mobile-block::before {
    content: '';
    position: absolute;
    inset: -40% auto auto -35%;
    width: 55%;
    height: 160%;
    background: linear-gradient(120deg, rgba(124, 92, 255, 0.18), rgba(61, 213, 195, 0.06), transparent 62%);
    pointer-events: none;
    transform: rotate(12deg);
    opacity: 0.7;
}

@media (hover: hover) {
    body.photo-view:not(.tg-view) .sidebar-panel:hover,
    body.photo-view:not(.tg-view) .photo-generator:hover,
    body.photo-view:not(.tg-view) .photo-model-picker:hover,
    body.photo-view:not(.tg-view) .photo-result-panel:hover {
        transform: none !important;
        border-color: var(--border) !important;
        box-shadow: none !important;
    }
}

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

.photo-history-header h2 {
    margin-bottom: 0;
}

#mainSection.section {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.section h2 {
    font-size: 22px;
    margin-bottom: 14px;
    color: #f9fafb;
}

.generator-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(124, 92, 255, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(124, 92, 255, 0.4);
}

.section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #e2e8f0;
}

.section p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(61, 213, 195, 0.12));
    border: 1px solid rgba(124, 92, 255, 0.35);
    margin-bottom: 18px;
}


.generator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: start;
}

.generator-layout.hide-settings {
    grid-template-columns: minmax(0, 1fr);
}

.generator-layout.hide-settings .generator-settings {
    display: none;
}

.generator-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.generator-settings {
    position: sticky;
    top: 120px;
}

.settings-card {
    background: #0d131e;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-title {
    font-size: 14px;
    color: #f9fafb;
    font-weight: 600;
}

.settings-label {
    font-size: 12px;
    color: var(--muted);
}
.required-star {
    color: #ff4d6a;
    font-weight: 700;
    margin-left: 2px;
}

.settings-select {
    background: #0b0f15;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 13px;
}

.settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.settings-footer strong {
    color: #f9fafb;
    font-size: 16px;
}

.hero-card h2 {
    margin-bottom: 8px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ghost-btn {
    background: transparent;
    border: 1px solid rgba(124, 92, 255, 0.5);
    color: var(--text);
    padding: 13px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(124, 92, 255, 0.18);
}

.hero-badge {
    background: rgba(10, 15, 26, 0.55);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 120px;
    text-align: center;
}

.hero-badge span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-badge strong {
    display: block;
    font-size: 22px;
    color: #f8fafc;
    margin-top: 6px;
}

.top-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(8, 12, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.top-menu .menu-btn {
    width: auto;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(13, 19, 30, 0.8);
    min-width: 150px;
    text-align: center;
}

.top-menu .menu-btn.active {
    border-color: rgba(124, 92, 255, 0.6);
    background: rgba(124, 92, 255, 0.18);
}

.menu-btn {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s ease;
    text-align: left;
}

.menu-btn:hover {
    border-color: rgba(124, 92, 255, 0.4);
    background: rgba(124, 92, 255, 0.12);
}

.login-widget {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.logout-btn {
    background: rgba(249, 115, 115, 0.12);
    color: #fecaca;
}

.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(124, 92, 255, 0.16);
    color: #e9d5ff;
    font-weight: 600;
    min-height: 44px;
}

.admin-btn:hover {
    border-color: rgba(124, 92, 255, 0.45);
    background: rgba(124, 92, 255, 0.22);
}

.admin-hint {
    color: var(--muted);
    font-size: 12px;
}

.admin-block {
    margin: 15px 0;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.admin-form input,
.admin-form textarea {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.admin-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-strong);
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.admin-user-layout {
    display: grid;
    gap: 14px;
}

.admin-user-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-user-card {
    margin: 0;
}

.admin-user-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-user-tab-panel {
    display: block;
}

.task-status {
    color: var(--muted);
    font-size: 14px;
}

.admin-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: adminConfirmFadeIn 0.18s ease;
}
@keyframes adminConfirmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.admin-confirm-box {
    background: var(--card-bg, #1a1f2e);
    border: 1px solid var(--border, #2a2f3e);
    border-radius: 16px;
    padding: 28px 32px 22px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    animation: adminConfirmSlideUp 0.2s ease;
}
@keyframes adminConfirmSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.admin-confirm-box h4 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--text, #fff);
}
.admin-confirm-box p {
    margin: 0 0 22px;
    font-size: 14px;
    color: var(--muted, #8b95a5);
    line-height: 1.5;
}
.admin-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.admin-confirm-actions button {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}
.admin-confirm-actions button:active {
    transform: scale(0.97);
}
.admin-confirm-cancel {
    background: var(--border, #2a2f3e);
    color: var(--text, #fff);
}
.admin-confirm-cancel:hover {
    background: var(--hover-bg, #333a4e);
}
.admin-confirm-ok {
    background: #ef4444;
    color: #fff;
}
.admin-confirm-ok:hover {
    background: #dc2626;
}

.download-rename-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.download-rename-overlay.visible {
    opacity: 1;
}
.download-rename-box {
    background: var(--card-bg, #1a1f2e);
    border: 1px solid var(--border, #2a2f3e);
    border-radius: 16px;
    padding: 24px 28px 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}
.download-rename-overlay.visible .download-rename-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.download-rename-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text, #fff);
    margin-bottom: 14px;
    text-align: center;
}
.download-rename-label {
    font-size: 13px;
    color: var(--muted, #8b95a5);
    margin-bottom: 6px;
}
.download-rename-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border, #2a2f3e);
    background: var(--bg, #0e1117);
    color: var(--text, #fff);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    margin-bottom: 18px;
}
.download-rename-input:focus {
    border-color: var(--accent, #6c5ce7);
}
.download-rename-actions {
    display: flex;
    gap: 10px;
}
.download-rename-actions button {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}
.download-rename-actions button:active {
    transform: scale(0.97);
}
.download-rename-ok {
    background: var(--accent, #6c5ce7);
    color: #fff;
}
.download-rename-ok:hover {
    background: var(--accent-hover, #5a4bd1);
}
.download-rename-cancel {
    background: var(--border, #2a2f3e);
    color: var(--text, #fff);
}
.download-rename-cancel:hover {
    background: var(--hover-bg, #333a4e);
}

.toast {
    background: #121826;
    color: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    text-align: center;
    margin: 10px 0 20px;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border);
}

.toast.success {
    background: rgba(47, 191, 149, 0.18);
    color: #d1fae5;
}

.toast.error {
    background: rgba(249, 115, 115, 0.18);
    color: #fee2e2;
}

.detail-card {
    background: var(--card-strong);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 0;
    border: 1px solid var(--border);
}

#detailContent {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-card--clean {
    padding: 18px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 16px;
    color: var(--muted);
    font-size: 13px;
}

.detail-desc {
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cover-image {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
    display: block;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.profile-form input {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    background: #0d131e;
    color: var(--text);
}

.profile-form textarea {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    min-height: 90px;
    resize: vertical;
    background: #0d131e;
    color: var(--text);
}

.history-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.history-filters input,
.history-filters select {
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    background: #0d131e;
    color: var(--text);
}

.history-filters select#gallerySort {
    min-width: 160px;
}

.step {
    animation: fadeIn 0.3s;
}

.step.hidden {
    display: none;
}

.step h2 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    color: #e2e8f0;
}

.options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    padding: 16px;
    font-size: 15px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: var(--card-strong);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--text);
}

.option-btn:hover {
    border-color: rgba(124, 92, 255, 0.6);
    background: rgba(124, 92, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(124, 92, 255, 0.25);
}

.option-btn:active {
    transform: translateY(0);
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
    background: #0d131e;
    color: var(--text);
}

.composer-input {
    min-height: 140px;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.08);
}

#descriptionInput,
#customTextInput {
    min-height: 240px;
}

#customGenreInput {
    min-height: 180px;
}

textarea::placeholder,
input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.submit-btn, .back-btn {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.submit-btn {
    background: linear-gradient(135deg, #7c5cff 0%, #3dd5c3 100%);
    color: #0b0f15;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(124, 92, 255, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.back-btn {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5f5;
}

.back-btn:hover {
    background: #e0e0e0;
}

.progress-section {
    text-align: center;
    padding: 40px 20px;
}

.progress-container {
    max-width: 360px;
    margin: 0 auto;
    background: #0d131e;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 18px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    font-size: 12px;
    color: #888;
}

.progress-step {
    flex: 1;
    text-align: center;
}

.progress-step.active {
    color: #667eea;
    font-weight: 600;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.action-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.track-card {
    background: #0d131e;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 14px 30px rgba(4, 8, 15, 0.35);
}

.track-card.variant-a {
    border-color: rgba(124, 92, 255, 0.5);
    box-shadow: 0 18px 34px rgba(124, 92, 255, 0.25);
}

.track-card.variant-b {
    border-color: rgba(61, 213, 195, 0.45);
    box-shadow: 0 18px 34px rgba(61, 213, 195, 0.2);
}

.track-card.variant-a .track-title::after,
.track-card.variant-b .track-title::after {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.track-card.variant-a .track-title::after {
    content: "A";
    background: rgba(124, 92, 255, 0.2);
    color: #c4b5fd;
}

.track-card.variant-b .track-title::after {
    content: "B";
    background: rgba(61, 213, 195, 0.2);
    color: #99f6e4;
}

.track-cover {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
    display: grid;
    place-items: center;
}

.track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-fallback {
    font-size: 20px;
}

.track-body {
    flex: 1;
}

.track-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.track-card audio {
    width: 100%;
    margin-bottom: 8px;
}

.track-actions {
    display: flex;
    gap: 8px;
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.main-left,
.main-center,
.main-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.main-block {
    background: #0d131e;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.block-header {
    font-weight: 600;
    margin-bottom: 12px;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.news-card {
    background: #0b111b;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.news-title {
    font-weight: 600;
}

.news-body {
    color: var(--muted);
    font-size: 14px;
}

.news-date {
    font-size: 12px;
    color: var(--muted);
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 15, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.image-modal-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
}

.image-modal-content img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: #0b111b;
}

.image-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(17, 24, 39, 0.9);
    color: #e5e7eb;
    cursor: pointer;
}

.video-cover-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.song-cover .video-cover-wrap {
    width: 100%;
    height: 100%;
    align-self: stretch;
    justify-self: stretch;
}

.video-cover-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.video-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(10, 14, 24, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-cover-wrap:hover .video-expand-btn,
body.tg-view .video-expand-btn,
body.tg-mobile .video-expand-btn {
    opacity: 1;
}

.video-expand-btn:hover {
    background: rgba(124, 92, 255, 0.8);
    border-color: rgba(124, 92, 255, 0.6);
}

.video-fullscreen-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 0;
}

.video-fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-fullscreen-content video {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.video-fullscreen-close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(10, 14, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    z-index: 10001;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-fullscreen-close:hover {
    background: rgba(124, 92, 255, 0.8);
}

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 15, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.auth-modal-card {
    width: min(420px, 92vw);
    background: #0d131e;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(4, 8, 15, 0.5);
    position: relative;
    text-align: center;
}

.auth-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-modal-text {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-qr {
    width: 220px;
    height: 220px;
    margin: 0 auto 16px;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px;
    display: grid;
    place-items: center;
}

.auth-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-timer {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 14px;
}

.auth-actions {
    display: grid;
    gap: 10px;
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(124, 92, 255, 0.12);
    color: var(--text);
    cursor: pointer;
}

.song-card {
    background: #0d131e;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(4, 8, 15, 0.35);
}

.song-card.photo-card-enter {
    opacity: 0;
    transform: translateY(6px);
}

.song-card.photo-card-enter.is-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 140ms ease, transform 140ms ease;
}

.song-card.is-active,
.track-card.is-active {
    border-color: rgba(61, 213, 195, 0.6);
    box-shadow: 0 18px 36px rgba(61, 213, 195, 0.3);
}

.song-card.is-published {
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.2), 0 18px 36px rgba(124, 92, 255, 0.25);
}

.publish-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.18);
    color: #c4b5fd;
    font-size: 11px;
}

.removed-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    font-size: 11px;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.song-cover {
    width: 100%;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
    display: grid;
    place-items: center;
}

.song-cover img,
.song-cover video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

body:not(.tg-mobile) .song-cover img,
body:not(.tg-mobile) .song-cover video {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
}

.song-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.song-title {
    font-size: 15px;
    font-weight: 600;
}

.song-meta {
    font-size: 12px;
    color: var(--muted);
}

.song-card audio {
    width: 100%;
}

.audio-player {
    width: 100%;
    height: 34px;
    border-radius: 12px;
    background: #0b0f15;
    border: 1px solid var(--border);
}

.audio-player::-webkit-media-controls-panel {
    background: #0b0f15;
}

.audio-player::-webkit-media-controls-play-button,
.audio-player::-webkit-media-controls-mute-button {
    filter: invert(1);
}

.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display {
    color: #cbd5f5;
}

.audio-player::-webkit-media-controls-volume-slider,
.audio-player::-webkit-media-controls-timeline {
    filter: invert(1);
}

.song-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.panel-item {
    cursor: pointer;
}

.song-actions .icon-btn {
    font-size: 12px;
    padding: 6px 10px;
}

.player {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #0b0f15;
}

.player .waveform {
    display: grid;
    grid-template-columns: repeat(22, 1fr);
    gap: 3px;
    height: 20px;
    align-items: end;
}

.player .wave {
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: rgba(124, 92, 255, 0.3);
    transition: height 0.2s ease, background 0.2s ease;
}

.player .wave:nth-child(3n) {
    height: 14px;
}

.player .wave:nth-child(4n) {
    height: 18px;
}

.player .wave:nth-child(5n) {
    height: 12px;
}

.player.is-playing .wave {
    background: rgba(61, 213, 195, 0.7);
}

.player-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0d131e;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
}

.player-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-range {
    width: 100%;
    accent-color: #7c5cff;
}

.player-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
}

.player-audio {
    display: none;
}

.lyrics-box {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #0b0f15;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.icon-btn {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    border-color: rgba(124, 92, 255, 0.5);
    background: rgba(124, 92, 255, 0.18);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #0b0f15;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c5cff 0%, #3dd5c3 100%);
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

#progressText {
    font-size: 18px;
    color: #cbd5f5;
    margin-bottom: 10px;
}

.result-section {
    text-align: center;
    padding: 20px;
}

.result-section h2 {
    color: var(--success);
    margin-bottom: 20px;
}

#resultContent {
    background: #0d131e;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: left;
    border: 1px solid var(--border);
}

.result-actions {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.result-actions button {
    width: 100%;
}

.lyrics-preview {
    white-space: pre-wrap;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #0b0f15;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text);
    font-family: "Georgia", "Times New Roman", serif;
}

.lyrics-editor {
    width: 100%;
    min-height: 300px;
    max-height: 300px;
    background: #0b0f15;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    padding: 12px;
    resize: vertical;
    font-family: "Georgia", "Times New Roman", serif;
}

body[data-theme="light"] .lyrics-preview,
body[data-theme="light"] .lyrics-editor {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.3);
    color: #0f172a;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.payment-btn {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0d131e;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-btn:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 255, 0.14);
}

.login-card {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.login-card p {
    color: var(--muted);
    margin: 12px 0 18px;
    font-size: 14px;
}

.login-card-modern {
    max-width: 520px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(12, 18, 31, 0.98) 100%);
    border: 1px solid rgba(116, 133, 170, 0.25);
    border-radius: 24px;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.45);
    padding: 34px 30px 28px;
}

.login-card-modern h2 {
    color: #f3f6ff;
    font-size: 54px;
    line-height: 0.98;
    margin-bottom: 12px;
}

.login-card-modern p {
    color: #9eabc7;
    margin-bottom: 22px;
}

.phone-login-method-tabs {
    display: flex;
    gap: 6px;
    background: rgba(19, 28, 46, 0.8);
    border: 1px solid rgba(102, 123, 165, 0.3);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 16px;
}

.phone-login-method-btn {
    border: none;
    background: transparent;
    color: #98a8c9;
    border-radius: 11px;
    padding: 11px 12px;
    font-weight: 600;
    cursor: pointer;
    flex: 1 1 0;
}

.phone-login-method-btn.is-active {
    background: linear-gradient(180deg, rgba(44, 58, 88, 0.92) 0%, rgba(32, 46, 74, 0.92) 100%);
    color: #f3f6ff;
    box-shadow: 0 6px 14px rgba(6, 10, 20, 0.38);
}

.phone-login-block {
    text-align: left;
    margin-bottom: 12px;
}

.phone-login-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 8px;
}

.phone-login-input {
    width: 100%;
    margin: 0;
    border: none;
    background: transparent !important;
    background-color: transparent !important;
    color: #e8eeff;
    padding: 0 2px;
    min-height: 0;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    box-shadow: none;
    appearance: none;
    text-decoration: none;
    line-height: 1.2;
}

.phone-login-input::placeholder {
    color: #7f8cab;
}

.phone-login-input:-webkit-autofill,
.phone-login-input:-webkit-autofill:hover,
.phone-login-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e8eeff;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #e8eeff;
}

.phone-login-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid rgba(112, 130, 168, 0.58);
    border-radius: 999px;
    background: rgba(14, 22, 37, 0.95);
    min-height: 54px;
    padding: 12px 18px;
    margin: 0 0 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.phone-login-input-wrap:focus-within {
    border-color: #6f7dff;
    box-shadow: 0 0 0 3px rgba(95, 102, 232, 0.22);
    transform: translateY(-1px);
}

.phone-login-country {
    font-weight: 600;
    color: #d9e3ff;
    min-width: 28px;
}

.phone-login-code-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 2px 0 12px;
}

.phone-login-code-digit {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.8px;
    min-height: 64px;
    border: 1.5px solid rgba(112, 130, 168, 0.58);
    border-radius: 12px;
    background: rgba(14, 22, 37, 0.95);
    color: #eff3ff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.phone-login-code-digit:focus {
    border-color: #6268ee;
    box-shadow: 0 0 0 3px rgba(98, 104, 238, 0.15);
    transform: translateY(-1px);
    outline: none;
}

.phone-login-send-btn,
.phone-login-verify-btn {
    width: 100%;
    justify-content: center;
    border-radius: 999px;
    min-height: 52px;
}

#googleLoginBtn {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.phone-login-actions {
    display: grid;
    gap: 8px;
}

.phone-login-resend-btn {
    width: 100%;
}

.phone-login-switch-btn {
    width: 100%;
}

.phone-login-code {
    margin-top: 8px;
}

.phone-login-status {
    margin-top: 10px;
    min-height: 20px;
    font-size: 12px;
    color: #a4b1cc;
    text-align: left;
    line-height: 1.35;
}

.account-links-card {
    margin-top: 16px;
    border-radius: 16px;
    border: 1px solid rgba(102, 123, 165, 0.35);
    background: linear-gradient(180deg, rgba(18, 26, 42, 0.9) 0%, rgba(12, 18, 30, 0.95) 100%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    padding: 14px;
}

.account-links-title {
    font-size: 15px;
    font-weight: 700;
    color: #e8eeff;
}

.account-links-subtitle {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #a8b6d1;
}

.account-links-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.account-link-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 12px;
    border: 1px solid rgba(111, 131, 167, 0.5);
    color: #b7c4de;
    background: rgba(14, 22, 37, 0.8);
}

.account-link-badge.is-linked {
    border-color: rgba(61, 213, 195, 0.7);
    color: #8bf0e3;
    background: rgba(22, 64, 60, 0.35);
}

.account-links-actions {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.account-links-status {
    margin-top: 8px;
    min-height: 18px;
    font-size: 12px;
    color: #9db0d4;
}

.account-link-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.account-link-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 13, 0.74);
}

.account-link-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(111, 131, 167, 0.42);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(11, 18, 31, 0.98));
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
    padding: 16px;
}

.account-link-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #f2f6ff;
}

.account-link-modal-subtitle {
    margin-top: 6px;
    margin-bottom: 12px;
    color: #a7b4ce;
    font-size: 12px;
    line-height: 1.4;
}

.account-link-modal-close {
    width: 100%;
    margin-top: 10px;
}

body[data-theme="light"] .account-links-card {
    background: #f8faff;
    border-color: #d2dbef;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

body[data-theme="light"] .account-links-title {
    color: #101827;
}

body[data-theme="light"] .account-links-subtitle {
    color: #63708a;
}

body[data-theme="light"] .account-link-badge {
    border-color: #d4dced;
    color: #536079;
    background: #ffffff;
}

body[data-theme="light"] .account-link-badge.is-linked {
    border-color: rgba(16, 185, 129, 0.45);
    color: #0f766e;
    background: rgba(16, 185, 129, 0.1);
}

body[data-theme="light"] .account-links-status {
    color: #627089;
}

body[data-theme="light"] .account-link-modal-card {
    background: #ffffff;
    border-color: #d0d9ee;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

body[data-theme="light"] .account-link-modal-title {
    color: #0f172a;
}

body[data-theme="light"] .account-link-modal-subtitle {
    color: #5b667d;
}

.phone-login-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
    text-align: left;
    line-height: 1.35;
}

.phone-login-divider {
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0;
}

.login-card-modern .phone-login-send-btn,
.login-card-modern .phone-login-verify-btn {
    background: linear-gradient(135deg, #6068ee 0%, #4f58e8 100%);
    color: #fff;
    border: none;
    box-shadow: 0 10px 24px rgba(89, 92, 232, 0.28);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.login-card-modern .phone-login-send-btn:hover,
.login-card-modern .phone-login-verify-btn:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(89, 92, 232, 0.34);
}

.login-card-modern .phone-login-resend-btn,
.login-card-modern .phone-login-switch-btn {
    border-radius: 999px;
    border-color: rgba(112, 130, 168, 0.58);
    color: #a9b4cd;
    background: rgba(15, 22, 38, 0.9);
}

.login-card-modern .phone-login-resend-btn:hover,
.login-card-modern .phone-login-switch-btn:hover {
    border-color: rgba(130, 149, 188, 0.72);
    color: #dbe4fb;
    background: rgba(26, 35, 54, 0.95);
}

body[data-theme="light"] .login-card-modern {
    background: #f4f6fb;
    border: 1px solid #d8dff0;
    box-shadow: 0 22px 46px rgba(8, 14, 28, 0.24);
}

body[data-theme="light"] .login-card-modern h2 {
    color: #0f1420;
}

body[data-theme="light"] .login-card-modern p {
    color: #5f6677;
}

body[data-theme="light"] .phone-login-method-tabs {
    background: #e9edf6;
    border-color: transparent;
}

body[data-theme="light"] .phone-login-method-btn {
    color: #58627a;
}

body[data-theme="light"] .phone-login-method-btn.is-active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 4px 10px rgba(63, 78, 120, 0.18);
}

body[data-theme="light"] .phone-login-input {
    color: #1f2937;
}

body[data-theme="light"] .phone-login-input::placeholder {
    color: #9aa5bc;
}

body[data-theme="light"] .phone-login-input:-webkit-autofill,
body[data-theme="light"] .phone-login-input:-webkit-autofill:hover,
body[data-theme="light"] .phone-login-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1f2937;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    caret-color: #1f2937;
}

body[data-theme="light"] .phone-login-input-wrap {
    border-color: #c5d0e8;
    background: #ffffff;
}

body[data-theme="light"] .phone-login-input-wrap:focus-within {
    border-color: #6a6ff0;
    box-shadow: 0 0 0 3px rgba(95, 102, 232, 0.14);
}

body[data-theme="light"] .phone-login-country {
    color: #0f172a;
}

body[data-theme="light"] .phone-login-code-digit {
    border-color: #cfd6e8;
    background: #ffffff;
    color: #1a2140;
}

body[data-theme="light"] .phone-login-status {
    color: #63708b;
}

body[data-theme="light"] .login-card-modern .phone-login-resend-btn,
body[data-theme="light"] .login-card-modern .phone-login-switch-btn {
    border-color: #cfd4e7;
    color: #5d657b;
    background: #f9fbff;
}

body[data-theme="light"] .login-card-modern .phone-login-resend-btn:hover,
body[data-theme="light"] .login-card-modern .phone-login-switch-btn:hover {
    border-color: #b8c2dc;
    color: #3c4564;
    background: #f2f6ff;
}

body.tg-mobile #loginSection .login-card,
body.tg-mobile #photoLoginSection .login-card,
body.tg-mobile #videoLoginSection .login-card {
    background: transparent;
    border: none;
    padding: 0;
    max-width: 100%;
}

body.tg-mobile #loginSection .login-card h2,
body.tg-mobile #loginSection .login-card p,
body.tg-mobile #photoLoginSection .login-card h2,
body.tg-mobile #photoLoginSection .login-card p,
body.tg-mobile #videoLoginSection .login-card h2,
body.tg-mobile #videoLoginSection .login-card p {
    display: none;
}

body.tg-mobile #loginSection .login-card .login-btn,
body.tg-mobile #photoLoginSection .login-card .login-btn,
body.tg-mobile #videoLoginSection .login-card .login-btn {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c5cff 0%, #3dd5c3 100%);
    color: #0b0f15;
    border: none;
    font-weight: 600;
}

.start-page {
    padding: 32px 28px 48px;
}

.start-page .app-shell {
    max-width: 1200px;
}

.start-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.start-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.start-nav-btn {
    background: transparent;
    border: none;
    color: #cbd6f3;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.start-nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.start-nav-btn.is-active {
    color: #8db7ff;
}

.start-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 20px 10px 10px;
}

.start-hero-text h2 {
    font-size: 56px;
    margin: 10px 0 16px;
    letter-spacing: 1px;
}

.start-kicker {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(45, 130, 255, 0.12);
    color: #8db7ff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-hero-text p {
    color: #cbd6f3;
    font-size: 16px;
    line-height: 1.6;
    max-width: 520px;
}

.start-actions {
    margin-top: 24px;
}

.start-hero-art {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 260px;
}

.start-capsule {
    width: 240px;
    height: 420px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(120, 220, 255, 0.35), transparent 55%),
        linear-gradient(145deg, rgba(110, 255, 220, 0.2), rgba(180, 90, 255, 0.35));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(90, 200, 255, 0.25);
    overflow: hidden;
    display: grid;
    place-items: center;
    cursor: grab;
    perspective: 800px;
}

.start-capsule.is-dragging {
    cursor: grabbing;
}

.start-capsule img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.start-categories {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 26px 0 30px;
}

.start-card {
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 30, 0.6);
    color: #e7ecff;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.start-card:hover {
    transform: translateY(-2px);
    border-color: rgba(90, 180, 255, 0.45);
}

.start-card-active {
    background: rgba(45, 130, 255, 0.18);
    border-color: rgba(90, 180, 255, 0.65);
    color: #d7e6ff;
}

.start-info {
    padding: 20px;
    border-radius: 18px;
    background: rgba(14, 18, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.start-info-title {
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 12px;
    color: #b7c8ff;
}

.start-info-list {
    display: grid;
    gap: 10px;
}

.start-info-item {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(20, 24, 36, 0.75);
    color: #dde6ff;
    font-size: 14px;
}

.start-examples {
    margin-top: 22px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(14, 18, 28, 0.78), rgba(9, 14, 24, 0.84));
    border: 1px solid rgba(117, 157, 255, 0.14);
    box-shadow: 0 16px 42px rgba(5, 10, 20, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.start-examples-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.start-examples-title {
    font-weight: 600;
    letter-spacing: 1px;
    color: #d6e4ff;
}

.start-examples-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.start-examples-switch {
    display: inline-flex;
    background: rgba(8, 14, 24, 0.74);
    border: 1px solid rgba(124, 152, 255, 0.24);
    border-radius: 999px;
    padding: 3px;
    gap: 3px;
}

.start-examples-tab {
    border: none;
    background: transparent;
    color: #b9cfff;
    border-radius: 999px;
    padding: 7px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.start-examples-tab.is-active {
    background: linear-gradient(135deg, rgba(49, 107, 255, 0.34), rgba(61, 213, 195, 0.26));
    color: #f4f8ff;
    box-shadow: 0 0 0 1px rgba(140, 180, 255, 0.3) inset;
}

#startExampleViewport {
    display: grid;
    transition: opacity 0.2s ease, transform 0.22s ease;
}

#startExampleViewport.is-switch-out {
    opacity: 0;
    transform: translateY(6px) scale(0.995);
}

#startExampleViewport.is-switch-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.start-example-card {
    border-radius: 14px;
    border: 1px solid rgba(124, 152, 255, 0.16);
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.86), rgba(11, 19, 31, 0.92));
    padding: 14px;
    display: grid;
    gap: 10px;
}

.start-example-card--photo {
    gap: 12px;
}

.start-photo-stage {
    position: relative;
    padding: 0 30px;
    perspective: 1500px;
    overflow: hidden;
    min-height: clamp(320px, 44vw, 540px);
}

.start-photo-carousel {
    position: relative;
    min-height: clamp(320px, 44vw, 540px);
}

.start-photo-carousel--3d {
    transform-style: preserve-3d;
}

.start-photo-slide {
    position: absolute;
    left: 50%;
    top: 0;
    width: clamp(180px, 20vw, 270px);
    gap: 6px;
    transform: translate3d(var(--carousel-tx, 0), 0, var(--carousel-tz, 0)) rotateY(var(--carousel-rotY, 0deg)) scale(var(--carousel-scale, 1));
    opacity: var(--carousel-opacity, 1);
    z-index: var(--carousel-z, 1);
    pointer-events: var(--carousel-pointer-events, auto);
    transition: transform 560ms cubic-bezier(0.22, 0.72, 0.16, 1), opacity 420ms ease;
    margin-left: calc(clamp(180px, 20vw, 270px) / -2);
    will-change: transform, opacity;
}

.start-photo-media {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(7, 13, 22, 0.95);
    background-image: url('/placeholder/photo.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid rgba(130, 164, 255, 0.14);
    box-shadow: 0 12px 26px rgba(3, 8, 16, 0.42);
    aspect-ratio: 9 / 16;
    display: grid;
    place-items: center;
    padding: 0;
}

.start-example-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.start-photo-caption {
    font-size: 14px;
    color: #d9e8ff;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 2px 4px 0;
    text-shadow: 0 1px 6px rgba(6, 12, 25, 0.45);
}

.start-example-audio {
    width: 100%;
    border-radius: 10px;
    background: rgba(9, 15, 24, 0.9);
}

.start-audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(125, 160, 255, 0.22);
    background: linear-gradient(160deg, rgba(8, 16, 30, 0.95), rgba(12, 20, 36, 0.92));
    box-shadow: 0 12px 28px rgba(4, 10, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.start-audio-play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(130, 164, 255, 0.4);
    background: radial-gradient(circle at 30% 30%, rgba(95, 128, 255, 0.35), rgba(22, 33, 56, 0.96));
    color: #e8f0ff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.start-audio-main {
    flex: 1;
    display: grid;
    gap: 6px;
}

.start-audio-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #a8bbeb;
}

.start-audio-range {
    width: 100%;
    accent-color: #6f8dff;
}

.start-audio-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(111, 141, 255, 0.5), rgba(61, 213, 195, 0.55));
}

.start-audio-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(141, 180, 255, 0.8);
    background: #d9e7ff;
    box-shadow: 0 0 0 3px rgba(111, 141, 255, 0.2);
}

.start-audio-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.start-photo-nav {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(130, 164, 255, 0.2);
    background: rgba(20, 26, 40, 0.78);
    color: #e5eeff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.start-photo-nav:hover {
    background: rgba(37, 48, 70, 0.92);
    border-color: rgba(130, 164, 255, 0.45);
    transform: scale(1.03);
}

.start-photo-nav--prev,
.start-photo-nav--next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.start-photo-nav--prev {
    left: 2px;
}

.start-photo-nav--next {
    right: 2px;
}

.start-photo-nav--compact {
    position: static;
    width: 34px;
    height: 34px;
    font-size: 17px;
}

.start-example-caption {
    font-size: 14px;
    color: #eaf1ff;
    font-weight: 600;
}

.start-example-progress {
    font-size: 12px;
    color: #9fb7eb;
}

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

.photo-generator {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.photo-generator-body {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: stretch;
}

body.photo-generator-view .app-body > .sidebar,
body.photo-generator-view .app-body > .sidebar.sidebar-right {
    display: none;
}

body.photo-generator-view .app-body {
    grid-template-columns: 1fr;
}

body.photo-generator-view .content {
    grid-column: 1 / -1;
}

body.admin-user-view .app-body > .sidebar,
body.admin-user-view .app-body > .sidebar.sidebar-right {
    display: none;
}

body.admin-user-view .app-body {
    grid-template-columns: 1fr;
}

body.admin-user-view .content {
    grid-column: 1 / -1;
}

.photo-generator-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.photo-generator-content {
    position: relative;
}

.photo-generate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 12, 18, 0.92);
    border-radius: 18px;
    z-index: 5;
    display: grid;
    place-items: center;
}

.photo-generate-overlay.is-hidden {
    display: none;
}

.photo-error-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 14, 0.78);
    backdrop-filter: blur(6px);
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 20px;
}

.photo-error-overlay.is-hidden {
    display: none;
}

.photo-error-card {
    width: min(560px, 92vw);
    background: rgba(16, 22, 32, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 24px 48px rgba(5, 8, 14, 0.5);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
}

.photo-error-title {
    font-size: 22px;
    font-weight: 700;
    color: #fda4af;
}

.photo-error-message {
    font-size: 15px;
    line-height: 1.45;
    color: #e5e7eb;
}

.photo-error-hints {
    margin-top: 2px;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 12px;
}

.photo-error-hints-title {
    font-size: 13px;
    font-weight: 700;
    color: #f3f4f6;
    margin-bottom: 4px;
}

.photo-error-hint-item {
    font-size: 13px;
    line-height: 1.45;
    color: #cbd5e1;
}

.music-error-hints {
    margin-top: 12px;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 12px;
}

.music-error-hints-title {
    font-size: 13px;
    font-weight: 700;
    color: #f3f4f6;
    margin-bottom: 4px;
}

.music-error-hint-item {
    font-size: 13px;
    line-height: 1.45;
    color: #cbd5e1;
}

.photo-error-close-btn {
    align-self: center;
    min-width: 180px;
}

.photo-trimmer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 14, 0.78);
    backdrop-filter: blur(6px);
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 20px;
}

.photo-trimmer-overlay.is-hidden {
    display: none;
}

.photo-trimmer-card {
    width: min(560px, 92vw);
    background: rgba(16, 22, 32, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 24px 48px rgba(5, 8, 14, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.photo-trimmer-title {
    font-size: 18px;
    font-weight: 600;
    color: #e5e7eb;
}

.photo-trimmer-timeline-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photo-trimmer-times {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #9ca3af;
}

.photo-trimmer-duration {
    color: rgba(124, 92, 255, 0.95);
    font-weight: 600;
}

.photo-trimmer-timeline {
    position: relative;
    height: 40px;
    cursor: pointer;
    touch-action: none;
}

.photo-trimmer-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    margin-top: -4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.photo-trimmer-selected {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(124, 92, 255, 0.5);
    border-radius: 4px;
    pointer-events: none;
}

.photo-trimmer-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    background: rgba(124, 92, 255, 0.95);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: grab;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.photo-trimmer-thumb:active {
    cursor: grabbing;
}

.photo-trimmer-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 4px;
}

.photo-upload-trim {
    padding: 6px 14px;
    font-size: 13px;
    background: rgba(124, 92, 255, 0.25);
    color: #c4b5fd;
    border: 1px solid rgba(124, 92, 255, 0.5);
    border-radius: 10px;
    cursor: pointer;
}

.photo-upload-trim:hover {
    background: rgba(124, 92, 255, 0.4);
}

.photo-generate-card {
    width: min(520px, 90%);
    background: rgba(16, 22, 32, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(5, 8, 14, 0.45);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.photo-generate-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(124, 92, 255, 0.25);
    border-top-color: rgba(124, 92, 255, 0.95);
    animation: photoSpinner 0.9s linear infinite;
    will-change: transform;
    contain: strict;
}

.photo-generate-title {
    font-size: 18px;
    font-weight: 700;
}

.photo-generate-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.photo-generate-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.14);
    overflow: hidden;
}

.photo-generate-progress-bar {
    height: 100%;
    width: 12%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.9), rgba(61, 213, 195, 0.9));
    transition: width 0.4s ease;
}

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

.photo-generator-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.photo-model-change {
    margin-left: 10px;
    border: 1px solid rgba(124, 92, 255, 0.5);
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(61, 213, 195, 0.14));
    color: #e7e2ff;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.photo-model-change:hover {
    border-color: rgba(124, 92, 255, 0.78);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.24);
    filter: brightness(1.04);
}

body[data-theme="light"] .photo-model-change {
    color: #312e81;
    border-color: rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.photo-model-change.is-hidden {
    display: none;
}

.photo-model-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-model-variant {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 20, 30, 0.7);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-model-variant:hover {
    border-color: rgba(90, 180, 255, 0.45);
    transform: translateY(-1px);
}

.photo-model-variant.is-active {
    border-color: rgba(124, 92, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.2);
}

body.photo-view:not(.tg-view) .photo-model-variant,
body.photo-view:not(.tg-view) .photo-model-variant:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
    background: rgba(15, 20, 30, 0.7) !important;
    transform: none !important;
}

body.photo-view:not(.tg-view) .photo-model-variant.is-active {
    border-color: rgba(124, 92, 255, 0.9) !important;
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35) !important;
    background: rgba(124, 92, 255, 0.2) !important;
}

body[data-theme="light"].photo-view:not(.tg-view) .photo-model-variant {
    border-color: rgba(148, 163, 184, 0.45) !important;
    background: rgba(226, 232, 240, 0.85) !important;
    color: #1f2937 !important;
}

body[data-theme="light"].photo-view:not(.tg-view) .photo-model-variant.is-active {
    border-color: rgba(99, 102, 241, 0.72) !important;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.28) !important;
    background: rgba(99, 102, 241, 0.18) !important;
    color: #312e81 !important;
}

.photo-model-picker {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(16, 22, 32, 0.85);
    padding: 16px;
    margin-bottom: 18px;
}

.photo-model-picker.is-hidden {
    display: none;
}

.photo-model-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.photo-model-picker-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
}

.photo-model-filter-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    background: rgba(10, 14, 22, 0.7);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-model-filter-title {
    font-weight: 600;
    font-size: 13px;
}

.photo-model-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photo-filter-btn {
    border: 1px solid var(--border);
    background: rgba(15, 20, 30, 0.65);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-filter-btn:hover {
    border-color: rgba(90, 180, 255, 0.45);
    transform: translateY(-1px);
}

.photo-filter-btn.is-active {
    border-color: rgba(124, 92, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.16);
}

.photo-filter-clear {
    margin-top: auto;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.photo-model-picker-title {
    font-weight: 600;
}

.photo-model-picker-head input {
    border: 1px solid var(--border);
    background: rgba(15, 20, 30, 0.65);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    min-width: 200px;
}

.photo-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.photo-revolver-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 520px;
}

.photo-revolver-head {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.4px;
}

.photo-revolver-stage {
    --drum-size: 220px;
    --drum-radius: 88px;
    --chamber-size: 34px;
    --core-size: 62px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 10px;
    min-height: 250px;
    position: relative;
}

.photo-revolver-drum {
    --drum-rotation: 0deg;
    position: relative;
    width: var(--drum-size);
    height: var(--drum-size);
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid rgba(206, 212, 228, 0.35);
    background:
        radial-gradient(circle at 48% 44%, rgba(34, 40, 58, 0.96), rgba(11, 14, 22, 0.98) 70%),
        conic-gradient(
            from 0deg,
            rgba(245, 249, 255, 0.16),
            rgba(158, 110, 255, 0.2) 25%,
            rgba(248, 205, 136, 0.2) 50%,
            rgba(158, 110, 255, 0.2) 75%,
            rgba(245, 249, 255, 0.16) 100%
        );
    transform: rotate(var(--drum-rotation));
    transition: transform 0.35s ease;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 28px rgba(0, 0, 0, 0.45),
        0 22px 38px rgba(5, 8, 14, 0.5);
    touch-action: none;
    user-select: none;
}

.photo-revolver-drum.is-free-spin {
    transition: none;
}

.photo-revolver-drum::before {
    content: "";
    position: absolute;
    inset: calc(50% - var(--drum-radius) - (var(--chamber-size) / 2));
    border-radius: 50%;
    border: 2px solid rgba(164, 176, 208, 0.25);
    box-shadow: inset 0 0 0 1px rgba(240, 243, 255, 0.06);
    pointer-events: none;
}

.photo-revolver-drum::after {
    content: "";
    position: absolute;
    inset: calc(50% - var(--drum-radius) + (var(--chamber-size) / 2));
    border-radius: 50%;
    border: 2px solid rgba(143, 93, 255, 0.55);
    box-shadow: 0 0 14px rgba(143, 93, 255, 0.35);
    pointer-events: none;
}

.photo-revolver-chamber {
    position: absolute;
    top: 50%;
    left: 50%;
    transform:
        translate(-50%, -50%)
        rotate(var(--chamber-angle))
        translateY(calc(var(--drum-radius) * -1))
        rotate(calc(-1 * var(--chamber-angle)));
    border: 1px solid rgba(220, 226, 241, 0.3);
    background:
        radial-gradient(circle at 35% 30%, rgba(86, 92, 112, 0.9), rgba(30, 35, 49, 0.92) 56%, rgba(11, 13, 20, 0.96));
    color: var(--text);
    border-radius: 999px;
    width: var(--chamber-size);
    height: var(--chamber-size);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
    opacity: 0.9;
    display: grid;
    place-items: center;
    z-index: 2;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 6px 14px rgba(3, 6, 12, 0.4);
}

.photo-revolver-chamber.is-active {
    opacity: 1;
    transform:
        translate(-50%, -50%)
        rotate(var(--chamber-angle))
        translateY(calc(var(--drum-radius) * -1))
        rotate(calc(-1 * var(--chamber-angle)));
}

.photo-revolver-bullet {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(170, 134, 255, 0.78) 52%, rgba(96, 53, 214, 0.9));
    border: 1px solid rgba(221, 210, 255, 0.75);
    box-shadow:
        0 0 8px rgba(164, 120, 255, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

.photo-revolver-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--core-size);
    height: var(--core-size);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(212, 218, 236, 0.34);
    background:
        radial-gradient(circle at 35% 28%, rgba(88, 96, 122, 0.92), rgba(22, 28, 40, 0.96) 58%, rgba(10, 13, 21, 0.98));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 18px rgba(128, 86, 255, 0.18);
    z-index: 1;
    animation: photoCoreBreath 2.8s ease-in-out infinite;
}

.photo-revolver-core::before {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(210, 189, 255, 0.92) 0%, rgba(151, 105, 255, 0.52) 34%, rgba(78, 46, 170, 0.1) 66%, transparent 100%);
    box-shadow: 0 0 12px rgba(152, 106, 255, 0.5);
    pointer-events: none;
    filter: saturate(1.15);
    animation: photoCorePlasma 1.8s ease-in-out infinite;
}

.photo-revolver-core::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(126, 86, 246, 0.28);
    pointer-events: none;
    animation: photoCoreHalo 2.6s ease-in-out infinite;
}

@keyframes photoCoreBreath {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.025);
    }
}

@keyframes photoCorePlasma {
    0%, 100% {
        opacity: 0.66;
        transform: scale(0.95);
        box-shadow: 0 0 8px rgba(152, 106, 255, 0.34);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.03);
        box-shadow: 0 0 16px rgba(168, 116, 255, 0.58), 0 0 24px rgba(121, 77, 238, 0.3);
    }
}

@keyframes photoCoreHalo {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.65;
        transform: scale(1.04);
    }
}

.photo-revolver-selector {
    --selector-size: 34px;
    position: absolute;
    left: 50%;
    top: calc(50% - var(--drum-radius) - (var(--selector-size) / 2) + 1px);
    transform: translateX(-50%);
    width: var(--selector-size);
    height: var(--selector-size);
    border-radius: 50%;
    border: 2px solid rgba(222, 202, 255, 0.88);
    box-shadow:
        0 0 0 1px rgba(124, 92, 255, 0.62),
        0 0 10px rgba(168, 116, 255, 0.5),
        0 8px 20px rgba(5, 8, 14, 0.45);
    pointer-events: none;
    z-index: 5;
}

.photo-revolver-selector::before {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 1px);
    width: 5px;
    height: calc(var(--drum-radius) - (var(--selector-size) / 2) - (var(--core-size) / 2) + 2px);
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(236, 223, 255, 0.18) 0%, rgba(228, 210, 255, 0.92) 18%, rgba(146, 95, 255, 0.72) 100%);
    box-shadow: 0 0 10px rgba(156, 100, 255, 0.58);
}

.photo-revolver-selector::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid rgba(214, 192, 255, 0.65);
    box-shadow: 0 0 16px rgba(166, 110, 255, 0.48);
}

.photo-revolver-nav {
    border: 1px solid var(--border);
    background: rgba(15, 20, 30, 0.75);
    color: var(--text);
    border-radius: 12px;
    height: 40px;
    width: 44px;
    cursor: pointer;
    font-weight: 700;
}

.photo-model-card--active {
    border-color: rgba(124, 92, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.24), 0 16px 30px rgba(8, 12, 20, 0.35);
    min-height: 220px;
    overflow: hidden;
}

.photo-model-card--active .photo-model-card-meta {
    max-height: 116px;
    overflow: auto;
    align-content: flex-start;
}

.photo-model-card--active .photo-model-card-title {
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-revolver-hint {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

body[data-theme="light"] .photo-revolver-stage {
    border: 1px solid rgba(180, 190, 208, 0.42);
    border-radius: 22px;
    padding: 10px 6px;
    background: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 8px 18px rgba(80, 102, 148, 0.1);
}

body[data-theme="light"] .photo-revolver-drum {
    border-color: rgba(142, 122, 103, 0.44);
    background:
        radial-gradient(circle at 48% 44%, rgba(255, 251, 244, 0.97), rgba(237, 222, 203, 0.95) 62%, rgba(209, 186, 162, 0.93) 100%),
        conic-gradient(
            from 0deg,
            rgba(255, 255, 255, 0.26),
            rgba(246, 208, 150, 0.22) 24%,
            rgba(232, 118, 94, 0.2) 50%,
            rgba(246, 208, 150, 0.22) 76%,
            rgba(255, 255, 255, 0.26) 100%
        );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.46),
        inset 0 0 20px rgba(98, 67, 44, 0.2),
        0 14px 26px rgba(104, 83, 62, 0.24);
}

body[data-theme="light"] .photo-revolver-drum::before {
    border-color: rgba(170, 147, 127, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.42);
}

body[data-theme="light"] .photo-revolver-drum::after {
    border-color: rgba(226, 116, 88, 0.76);
    box-shadow: 0 0 9px rgba(228, 113, 84, 0.34);
}

body[data-theme="light"] .photo-revolver-chamber {
    border-color: rgba(188, 164, 138, 0.58);
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 250, 242, 0.95), rgba(245, 221, 191, 0.93) 58%, rgba(214, 177, 138, 0.94));
    box-shadow:
        inset 0 0 0 1px rgba(255, 252, 246, 0.5),
        0 5px 11px rgba(107, 79, 51, 0.24);
}

body[data-theme="light"] .photo-revolver-bullet {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.99), rgba(171, 205, 255, 0.9) 52%, rgba(77, 130, 255, 0.86));
    border-color: rgba(177, 212, 255, 0.95);
    box-shadow:
        0 0 8px rgba(96, 153, 255, 0.5),
        0 0 14px rgba(58, 123, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.82);
}

body[data-theme="light"] .photo-revolver-core {
    border-color: rgba(188, 153, 117, 0.66);
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 248, 235, 0.96), rgba(241, 203, 158, 0.94) 58%, rgba(206, 146, 105, 0.95));
    box-shadow:
        inset 0 0 0 1px rgba(255, 247, 230, 0.48),
        0 0 14px rgba(233, 126, 93, 0.2);
}

body[data-theme="light"] .photo-revolver-core::before {
    background: radial-gradient(circle, rgba(255, 250, 236, 0.96) 0%, rgba(255, 202, 129, 0.58) 36%, rgba(232, 117, 87, 0.12) 72%, transparent 100%);
    box-shadow: 0 0 10px rgba(230, 122, 90, 0.34);
}

body[data-theme="light"] .photo-revolver-core::after {
    box-shadow: 0 0 12px rgba(230, 120, 88, 0.24);
}

body[data-theme="light"] .photo-revolver-selector {
    border-color: rgba(255, 218, 156, 0.98);
    box-shadow:
        0 0 0 1px rgba(227, 120, 90, 0.54),
        0 0 10px rgba(237, 140, 87, 0.44),
        0 7px 14px rgba(106, 71, 42, 0.22);
}

body[data-theme="light"] .photo-revolver-selector::before {
    background: linear-gradient(to bottom, rgba(255, 240, 212, 0.24) 0%, rgba(255, 198, 118, 0.9) 18%, rgba(224, 102, 78, 0.68) 100%);
    box-shadow: 0 0 8px rgba(228, 113, 83, 0.4);
}

body[data-theme="light"] .photo-revolver-nav {
    border-color: rgba(191, 164, 136, 0.56);
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(244, 230, 214, 0.93));
    color: #7b5238;
    box-shadow: 0 8px 14px rgba(121, 91, 61, 0.16);
}

body[data-theme="light"] .photo-revolver-nav:hover {
    background: linear-gradient(180deg, rgba(255, 255, 251, 0.98), rgba(250, 238, 224, 0.95));
    border-color: rgba(214, 129, 96, 0.66);
}

body[data-theme="light"] .photo-revolver-chamber.is-active .photo-revolver-bullet {
    box-shadow:
        0 0 10px rgba(86, 148, 255, 0.62),
        0 0 20px rgba(69, 127, 255, 0.5),
        0 0 30px rgba(123, 186, 255, 0.36),
        inset 0 1px 2px rgba(255, 255, 255, 0.86);
}

.photo-model-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(17, 23, 35, 0.95), rgba(9, 12, 18, 0.95));
    border-radius: 16px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 16px 30px rgba(5, 8, 14, 0.35);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-model-card:hover {
    border-color: inherit !important;
    transform: none !important;
    box-shadow: inherit !important;
}

.photo-model-card:focus,
.photo-model-card:focus-visible,
.photo-model-card:active {
    outline: none !important;
    border-color: inherit !important;
    box-shadow: inherit !important;
    transform: none !important;
}

body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card--active {
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 30px rgba(5, 8, 14, 0.35) !important;
    min-height: 110px !important;
}

body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card,
body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card:focus,
body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card:focus-visible,
body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card:active,
body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card--active {
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
    filter: none !important;
}

body.photo-view:not(.tg-view) #photoModelGrid .photo-model-card:hover {
    background: linear-gradient(180deg, rgba(28, 34, 52, 0.98), rgba(16, 22, 36, 0.98)) !important;
    border-color: rgba(124, 92, 255, 0.78) !important;
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.24) !important;
    transform: none !important;
    filter: none !important;
}

body[data-theme="light"] #photoModelGrid .photo-model-card--active {
    border-color: rgba(100, 116, 139, 0.22) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1) !important;
}

body[data-theme="light"].photo-view:not(.tg-view) #photoModelGrid .photo-model-card,
body[data-theme="light"].photo-view:not(.tg-view) #photoModelGrid .photo-model-card:focus,
body[data-theme="light"].photo-view:not(.tg-view) #photoModelGrid .photo-model-card:focus-visible,
body[data-theme="light"].photo-view:not(.tg-view) #photoModelGrid .photo-model-card:active,
body[data-theme="light"].photo-view:not(.tg-view) #photoModelGrid .photo-model-card--active {
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
    border-color: rgba(71, 85, 105, 0.42) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0 0 1px rgba(148, 163, 184, 0.2) !important;
}

body[data-theme="light"].photo-view:not(.tg-view) #photoModelGrid .photo-model-card:hover {
    background: linear-gradient(180deg, #ffffff, #f3f1ff) !important;
    border-color: rgba(99, 102, 241, 0.58) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0 0 1px rgba(99, 102, 241, 0.28) !important;
    transform: none !important;
}

body.photo-view:not(.tg-view) #photoGenerateSection .photo-model-picker,
body.photo-view:not(.tg-view) #photoGenerateSection .photo-model-filter-panel,
body.photo-view:not(.tg-view) #photoGenerateSection #photoModelGrid .photo-model-card:focus,
body.photo-view:not(.tg-view) #photoGenerateSection #photoModelGrid .photo-model-card:focus-visible,
body.photo-view:not(.tg-view) #photoGenerateSection #photoModelGrid .photo-model-card:active,
body.photo-view:not(.tg-view) #videoGenerateSection .photo-model-picker,
body.photo-view:not(.tg-view) #videoGenerateSection .photo-model-filter-panel,
body.photo-view:not(.tg-view) #videoGenerateSection #videoModelGrid .photo-model-card:focus,
body.photo-view:not(.tg-view) #videoGenerateSection #videoModelGrid .photo-model-card:focus-visible,
body.photo-view:not(.tg-view) #videoGenerateSection #videoModelGrid .photo-model-card:active {
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.photo-model-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #f2f5ff;
}

.photo-model-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.photo-model-empty {
    color: var(--muted);
    font-size: 12px;
}

.photo-model-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.16);
    border: 1px solid rgba(124, 92, 255, 0.4);
    color: #e7e2ff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.photo-model-tag--tti {
    background: rgba(80, 173, 255, 0.18);
    border-color: rgba(80, 173, 255, 0.45);
    color: #d9eeff;
}

.photo-model-tag--iti {
    background: rgba(52, 211, 153, 0.18);
    border-color: rgba(52, 211, 153, 0.42);
    color: #d5fff0;
}

.photo-model-tag--edit {
    background: rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.4);
    color: #fff3c1;
}

body[data-theme="light"] .photo-model-tag--tti {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1e3a8a;
}

body[data-theme="light"] .photo-model-tag--iti {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.34);
    color: #065f46;
}

body[data-theme="light"] .photo-model-tag--edit {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.36);
    color: #92400e;
}

body.photo-view:not(.tg-view) .photo-option-btn.is-active {
    border-color: rgba(124, 92, 255, 0.86) !important;
    background: rgba(124, 92, 255, 0.2) !important;
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.34) !important;
    transform: none !important;
}

body[data-theme="light"].photo-view:not(.tg-view) .photo-option-btn {
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(226, 232, 240, 0.85);
    color: #1f2937;
}

body[data-theme="light"].photo-view:not(.tg-view) .photo-option-btn:hover {
    border-color: rgba(99, 102, 241, 0.48);
    background: rgba(224, 231, 255, 0.9);
}

body[data-theme="light"].photo-view:not(.tg-view) .photo-option-btn.is-active {
    border-color: rgba(99, 102, 241, 0.72) !important;
    background: rgba(99, 102, 241, 0.18) !important;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.28) !important;
    color: #312e81;
}

body.photo-view:not(.tg-view) .photo-filter-btn[data-filter="text-to-image"] {
    border-color: rgba(80, 173, 255, 0.4) !important;
    background: rgba(80, 173, 255, 0.14) !important;
    color: #d9eeff !important;
}

body.photo-view:not(.tg-view) .photo-filter-btn[data-filter="image-to-image"] {
    border-color: rgba(52, 211, 153, 0.38) !important;
    background: rgba(52, 211, 153, 0.14) !important;
    color: #d5fff0 !important;
}

body.photo-view:not(.tg-view) .photo-filter-btn[data-filter="edit"] {
    border-color: rgba(250, 204, 21, 0.36) !important;
    background: rgba(250, 204, 21, 0.14) !important;
    color: #fff3c1 !important;
}

body.photo-view:not(.tg-view) .photo-filter-btn[data-filter="text-to-image"].is-active {
    border-color: rgba(80, 173, 255, 0.76) !important;
    background: rgba(80, 173, 255, 0.26) !important;
}

body.photo-view:not(.tg-view) .photo-filter-btn[data-filter="image-to-image"].is-active {
    border-color: rgba(52, 211, 153, 0.72) !important;
    background: rgba(52, 211, 153, 0.24) !important;
}

body.photo-view:not(.tg-view) .photo-filter-btn[data-filter="edit"].is-active {
    border-color: rgba(250, 204, 21, 0.7) !important;
    background: rgba(250, 204, 21, 0.24) !important;
}

:root[data-theme="light"] body .photo-filter-btn[data-filter="text-to-image"],
body[data-theme="light"] .photo-filter-btn[data-filter="text-to-image"] {
    border-color: rgba(59, 130, 246, 0.36) !important;
    background: rgba(59, 130, 246, 0.12) !important;
    color: #1e3a8a !important;
    font-weight: 600 !important;
}

:root[data-theme="light"] body .photo-filter-btn[data-filter="image-to-image"],
body[data-theme="light"] .photo-filter-btn[data-filter="image-to-image"] {
    border-color: rgba(16, 185, 129, 0.34) !important;
    background: rgba(16, 185, 129, 0.12) !important;
    color: #065f46 !important;
    font-weight: 600 !important;
}

:root[data-theme="light"] body .photo-filter-btn[data-filter="edit"],
body[data-theme="light"] .photo-filter-btn[data-filter="edit"] {
    border-color: rgba(245, 158, 11, 0.34) !important;
    background: rgba(245, 158, 11, 0.12) !important;
    color: #92400e !important;
    font-weight: 600 !important;
}

:root[data-theme="light"] body .photo-filter-btn[data-filter="text-to-image"].is-active,
body[data-theme="light"] .photo-filter-btn[data-filter="text-to-image"].is-active {
    border-color: rgba(59, 130, 246, 0.56) !important;
    background: rgba(59, 130, 246, 0.2) !important;
}

:root[data-theme="light"] body .photo-filter-btn[data-filter="image-to-image"].is-active,
body[data-theme="light"] .photo-filter-btn[data-filter="image-to-image"].is-active {
    border-color: rgba(16, 185, 129, 0.54) !important;
    background: rgba(16, 185, 129, 0.2) !important;
}

:root[data-theme="light"] body .photo-filter-btn[data-filter="edit"].is-active,
body[data-theme="light"] .photo-filter-btn[data-filter="edit"].is-active {
    border-color: rgba(245, 158, 11, 0.56) !important;
    background: rgba(245, 158, 11, 0.2) !important;
}

.photo-generator-content.is-hidden {
    display: none;
}

.photo-model-select-hidden {
    display: none;
}

.photo-model-meta {
    color: var(--muted);
    font-size: 13px;
}

.photo-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.photo-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.photo-size-buttons,
.photo-option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-size-btn,
.photo-option-btn {
    border: 1px solid var(--border);
    background: rgba(15, 20, 30, 0.65);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-size-btn:hover,
.photo-option-btn:hover {
    border-color: rgba(90, 180, 255, 0.45);
    transform: translateY(-1px);
}

.photo-size-btn.is-active,
.photo-option-btn.is-active {
    border-color: rgba(124, 92, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.16);
}

.photo-form-field input:not([type="checkbox"]):not([type="file"]) {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0d131e;
    color: var(--text);
}

.photo-boolean-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(10, 14, 22, 0.65);
    cursor: pointer;
}

.photo-boolean-label {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    flex: 1;
}

.photo-boolean-checkbox {
    width: 16px;
    height: 16px;
    accent-color: rgba(124, 92, 255, 0.95);
    cursor: pointer;
}

.photo-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(10, 14, 22, 0.65);
}

.photo-upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.photo-upload-clear {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.photo-upload-list {
    display: grid;
    gap: 10px;
}

.photo-upload-empty {
    color: var(--muted);
    font-size: 12px;
}

.photo-upload-item {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(15, 20, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.photo-upload-preview {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    background: #0d131e;
    display: grid;
    place-items: center;
}

.photo-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-preview-fallback {
    color: var(--muted);
    font-size: 20px;
}

.photo-upload-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-upload-name {
    font-size: 13px;
    font-weight: 600;
    word-break: break-all;
}

.photo-upload-size {
    font-size: 12px;
    color: var(--muted);
}

.photo-upload-remove {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.photo-upload-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
}

.photo-upload-add input {
    display: none;
}

.photo-upload-hint {
    color: var(--muted);
    font-size: 12px;
}

.photo-model-functions .start-info-list {
    margin-top: 8px;
}

.photo-presets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.photo-chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-chip {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 20, 30, 0.65);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.photo-chip:hover {
    border-color: rgba(90, 180, 255, 0.45);
    transform: translateY(-1px);
}

.photo-status {
    color: var(--muted);
    font-size: 13px;
}

.photo-generate-price-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.photo-prompt-editor-btn {
    margin-top: 8px;
    align-self: flex-start;
}

body.photo-prompt-open {
    overflow: hidden;
}

.photo-prompt-modal {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: none;
    background: rgba(5, 8, 14, 0.66);
}

.photo-prompt-modal.is-open {
    display: block;
}

.photo-prompt-sheet {
    position: absolute;
    inset: 0;
    background: #0b111b;
    color: #e5e7eb;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    padding: 12px;
    gap: 10px;
}

.photo-prompt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.photo-prompt-title {
    font-size: 18px;
    font-weight: 700;
}

.photo-prompt-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.7);
    color: #e5e7eb;
}

.photo-prompt-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.photo-prompt-tab {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5f5;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
}

.photo-prompt-tab.is-active {
    border-color: rgba(124, 92, 255, 0.6);
    background: rgba(124, 92, 255, 0.2);
    color: #f5f3ff;
}

.photo-prompt-body {
    min-height: 0;
}

.photo-prompt-input,
.photo-prompt-preview {
    width: 100%;
    height: 100%;
    min-height: 42dvh;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 14px;
    background: #0f1722;
    color: #e5e7eb;
    padding: 14px;
    font-size: 16px;
    line-height: 1.65;
}

.photo-prompt-preview {
    overflow: auto;
    white-space: pre-wrap;
}

.photo-prompt-foot {
    position: sticky;
    bottom: 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-prompt-meta {
    font-size: 12px;
    color: #9fb0c9;
}

.photo-prompt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.photo-prompt-actions .submit-btn {
    grid-column: 1 / -1;
}

body[data-theme="light"] .photo-prompt-sheet {
    background: #f8fafc;
    color: #0f172a;
}

body[data-theme="light"] .photo-prompt-close {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.32);
    color: #334155;
}

body[data-theme="light"] .photo-prompt-tab {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.26);
    color: #334155;
}

body[data-theme="light"] .photo-prompt-tab.is-active {
    background: #e0e7ff;
    border-color: rgba(99, 102, 241, 0.5);
    color: #312e81;
}

body[data-theme="light"] .photo-prompt-input,
body[data-theme="light"] .photo-prompt-preview {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.3);
    color: #0f172a;
}

body[data-theme="light"] .photo-prompt-meta {
    color: #64748b;
}

body.photo-tg-flow .photo-generator-body {
    grid-template-columns: 1fr;
}

body.photo-tg-flow .photo-result-panel {
    display: none;
    min-height: auto;
}

body.photo-tg-flow.photo-show-result .photo-form {
    display: none;
}

body.photo-tg-flow.photo-show-result .photo-result-panel {
    display: flex;
}

.photo-result {
    margin-top: 20px;
}

.photo-result-panel {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(16, 22, 32, 0.85);
    padding: 16px;
    min-height: 900px;
    display: flex;
    flex-direction: column;
}

.photo-result-title {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.photo-result-panel .photo-result {
    margin-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.photo-result-panel .photo-result .song-cover img,
.photo-result-panel .photo-result .song-cover video {
    width: 100%;
    height: 100%;
    max-height: none;
    max-width: 100%;
    object-fit: contain;
}

.photo-result-panel .photo-result .song-cover .video-cover-wrap {
    width: 100%;
    height: 100%;
}

.photo-result-panel .photo-result .song-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 720px;
    max-width: none;
    margin: 0;
    max-height: 1000px;
    background: transparent;
    border-radius: 16px;
}

.photo-result-panel .song-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.photo-result-panel .photo-result .song-card {
    height: auto;
}

@media (max-width: 1100px) {
    .photo-generator-body {
        grid-template-columns: 1fr;
    }
    .admin-user-top-grid {
        grid-template-columns: 1fr;
    }
}

.photo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.photo-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(16, 22, 32, 0.85);
    overflow: hidden;
}

.photo-card.compact {
    max-width: 320px;
}

.photo-cover {
    background: #0d131e;
    min-height: 160px;
    display: grid;
    place-items: center;
}

.photo-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    color: var(--muted);
    font-size: 13px;
    padding: 20px;
    text-align: center;
}

.photo-meta {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photo-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

#photoDetailContent .photo-card {
    max-width: 720px;
}

.photo-title {
    font-weight: 600;
    font-size: 14px;
}

.photo-sub {
    color: var(--muted);
    font-size: 12px;
}

.photo-mini {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 18, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.photo-mini-cover {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    background: #0d131e;
    display: grid;
    place-items: center;
}

.photo-mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-mini-title {
    font-size: 13px;
    font-weight: 600;
}

.photo-mini-sub {
    font-size: 11px;
    color: var(--muted);
}

.start-placeholder {
    margin-top: 28px;
    padding: 28px;
    border-radius: 20px;
    background: rgba(14, 18, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.start-placeholder h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.start-placeholder p {
    color: var(--muted);
    margin-bottom: 20px;
}

.start-placeholder-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-widget script {
    max-width: 100%;
}

.photo-help-guide {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.photo-help-hero h2 {
    margin: 0 0 4px;
}

.photo-help-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.85;
}

.photo-help-intro {
    font-size: 14px;
    line-height: 1.65;
    color: var(--muted);
}

.photo-help-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    padding-top: 4px;
}

.photo-help-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.photo-help-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(124, 92, 255, 0.06);
    border: 1px solid rgba(124, 92, 255, 0.12);
}

.photo-help-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.85), rgba(61, 213, 195, 0.85));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.photo-help-step-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.photo-help-step p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

.photo-help-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.photo-help-feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 14px;
    background: var(--card-strong);
    border: 1px solid var(--border);
}

.photo-help-feature-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.photo-help-feature strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.photo-help-feature p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}

.photo-help-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-help-contact {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(61, 213, 195, 0.06);
    border: 1px solid rgba(61, 213, 195, 0.12);
}

.photo-help-contact-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.photo-help-contact strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.photo-help-contact p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}

.photo-help-contact a {
    color: rgba(124, 92, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
}

.photo-help-contact a:hover {
    text-decoration: underline;
    color: rgba(124, 92, 255, 1);
}

.photo-help-contact-alt {
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(39, 135, 245, 0.08), rgba(66, 165, 245, 0.06));
    border: 1px solid rgba(39, 135, 245, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.photo-help-contact-alt-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #2787f5, #42a5f5);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.photo-help-contact-alt strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
}

.photo-help-contact-alt p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--subtext);
}

.photo-help-contact-alt a {
    color: #2787f5;
    text-decoration: none;
    font-weight: 600;
}

.photo-help-contact-alt a:hover {
    text-decoration: underline;
    color: #1a6fd4;
}

.photo-help-footer {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    font-weight: 500;
    text-align: center;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(61, 213, 195, 0.08));
    border: 1px solid rgba(124, 92, 255, 0.1);
}

body[data-theme="light"] .photo-help-step {
    background: rgba(124, 92, 255, 0.05);
    border-color: rgba(124, 92, 255, 0.1);
}

body[data-theme="light"] .photo-help-contact {
    background: rgba(61, 213, 195, 0.05);
    border-color: rgba(61, 213, 195, 0.1);
}

body[data-theme="light"] .photo-help-contact-alt {
    background: rgba(39, 135, 245, 0.05);
    border-color: rgba(39, 135, 245, 0.12);
}

body[data-theme="light"] .photo-help-footer {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.05), rgba(61, 213, 195, 0.05));
}

.tutorial-launch-btn {
    margin-top: 14px;
}

.app-tour-mask {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 14, 0.66);
    z-index: 7000;
}

.app-tour-highlight {
    position: fixed;
    border: 2px solid rgba(124, 92, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(5, 8, 14, 0.55), 0 0 0 4px rgba(124, 92, 255, 0.2);
    pointer-events: none;
    z-index: 7001;
    transition: all 0.18s ease;
}

.app-tour-popover {
    position: fixed;
    width: min(520px, calc(100vw - 16px));
    background: #0f1722;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    z-index: 7002;
    box-shadow: 0 18px 45px rgba(3, 8, 18, 0.45);
}

.app-tour-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.app-tour-progress {
    font-size: 12px;
    color: var(--muted);
}

.app-tour-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.app-tour-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.app-tour-text {
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.app-tour-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.app-tour-actions .submit-btn {
    grid-column: 1 / -1;
}

body[data-theme="light"] .app-tour-popover {
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.3);
}

body[data-theme="light"] .app-tour-highlight {
    border-color: rgba(99, 102, 241, 0.95);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.28), 0 0 0 4px rgba(99, 102, 241, 0.2);
}

@media (max-width: 960px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .start-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .start-hero {
        grid-template-columns: 1fr;
    }

    .start-photo-carousel {
        min-height: clamp(250px, 58vw, 360px);
    }

    .start-photo-stage {
        padding: 0 12px;
        min-height: clamp(250px, 58vw, 360px);
    }

    .start-photo-nav--prev {
        left: -6px;
    }

    .start-photo-nav--next {
        right: -6px;
    }

    .start-hero-text h2 {
        font-size: 40px;
    }

    .start-capsule {
        width: 200px;
        height: 320px;
    }

    .sidebar {
        position: static;
    }

    .sidebar-right {
        justify-self: stretch;
    }

    .footer-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .promo-card {
        grid-template-columns: 1fr;
    }

    .generator-layout {
        grid-template-columns: 1fr;
    }

    .generator-settings {
        position: static;
    }
}

@media (max-width: 600px) {
    body {
        padding: 16px 10px 40px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .content {
        padding: 20px;
    }
}

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