/* ═══════════════════════════════════════════════════════════
   GiftMusic — App Styles
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg:       #0a0a0a;
    --surface:  #16192a;
    --surface2: #1c2030;
    --border:   #262b3a;
    --text:     #e6e9f0;
    --text2:    #9ba3b8;
    --muted:    #6b7280;
    --primary:  #6366f1;
    --primary2: #5558e6;
    --success:  #22c55e;
    --danger:   #ef4444;
    --warning:  #eab308;
    --radius:   16px;
    --radius-sm:10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
    font-family: 'Vazirmatn', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
}

body { direction: rtl; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

.app-wrap {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 100px;
    position: relative;
}

/* ═══════════════════════════════════════════
   HOME
   ═══════════════════════════════════════════ */
.home-hero {
    text-align: center;
    padding: 80px 30px 40px;
}
.home-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    display: block;
}
.home-title {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -1px;
}
.home-subtitle {
    font-size: 15px;
    color: var(--text2);
    line-height: 1.8;
    max-width: 320px;
    margin: 0 auto 30px;
}
.home-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    margin: 0 auto;
}
.home-footer {
    text-align: center;
    padding: 60px 20px 20px;
    color: var(--muted);
    font-size: 12px;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary2); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(99,102,241,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
}
.btn-secondary:hover { background: var(--surface2); }

.btn-spotify {
    width: auto;
    min-width: 170px;
    padding: 12px 32px;
    background: rgba(30,30,30,0.9);
    backdrop-filter: blur(20px);
    color: #fff;
    border: 0.5px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}
.btn-spotify:hover:not(:disabled) { background: rgba(45,45,45,0.95); border-color: rgba(255,255,255,0.18); }
.btn-spotify:disabled,
.btn-spotify.disabled {
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════ */
.search-container {
    position: relative;
    padding: 16px 20px;
    z-index: 200;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.search-input {
    width: 100%;
    padding: 14px 44px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border 0.15s;
}
.search-input:focus { border-color: #e74c3c; }
.search-icon {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
}
.search-clear {
    position: absolute;
    left: 34px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--muted);
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.search-clear.show { display: flex; }

.search-results {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    max-height: 380px;
    overflow-y: auto;
    background: rgba(10,10,10,0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 300;
    display: none;
}
.search-results.show { display: block; }

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s;
}
.search-item:hover { background: rgba(255,255,255,0.04); }
.search-item.added { background: rgba(34,197,94,0.05); }

.search-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
}
.search-info { flex: 1; min-width: 0; }
.search-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-artist {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
}
.search-lyrics {
    font-size: 10.5px;
    color: #555;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-title strong,
.search-artist strong,
.search-lyrics strong { color: #e74c3c; font-weight: 700; }

.search-play,
.search-add {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.search-play {
    background: rgba(255,255,255,0.06);
    color: var(--text2);
    border: 1px solid rgba(255,255,255,0.08);
}
.search-play:hover { background: rgba(255,255,255,0.1); color: #fff; }
.search-add {
    background: #e74c3c;
    color: #fff;
    font-size: 18px;
    font-weight: 300;
}
.search-add:hover { background: #c0392b; transform: scale(1.1); }
.search-add.added { background: #27ae60; }

.search-loadmore {
    padding: 14px;
    text-align: center;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.search-loadmore:hover { background: rgba(255,255,255,0.03); }

/* ═══════════════════════════════════════════
   INLINE PLAYER
   ═══════════════════════════════════════════ */
.inline-player {
    width: 85%;
    margin: 0 auto;
    padding: 6px 0 12px;
    display: none;
}
.inline-player.show { display: block; }
.inline-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    cursor: pointer;
    direction: ltr;
    margin-bottom: 6px;
    overflow: hidden;
}
.inline-fill {
    height: 100%;
    background: #e74c3c;
    border-radius: 2px;
    width: 0%;
    transition: width 0.15s linear;
}
.inline-info {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--muted);
    font-family: 'SF Mono', Consolas, monospace;
    direction: ltr;
}
.inline-player.loading .inline-fill {
    background: linear-gradient(90deg, #e74c3c 0%, rgba(255,255,255,0.15) 50%, #e74c3c 100%);
    background-size: 300% 100%;
    animation: shimmer 1.6s infinite;
}

/* ═══════════════════════════════════════════
   PLAYLIST SECTION
   ═══════════════════════════════════════════ */
.playlist-section { padding: 20px; }
.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.playlist-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}
.playlist-count {
    font-size: 12px;
    color: var(--muted);
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 20px;
}
.playlist-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 14px;
    border: 2px dashed rgba(255,255,255,0.08);
    border-radius: var(--radius);
}
.playlist-songs { display: flex; flex-direction: column; gap: 8px; }

.song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.song-item:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.14); }
.song-item.dragging { opacity: 0.4; background: var(--primary); }
.song-item.ghost { opacity: 0.3; }

.song-drag {
    color: var(--muted);
    font-size: 16px;
    cursor: grab;
    padding: 0 4px;
    flex-shrink: 0;
}
.song-num {
    width: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    flex-shrink: 0;
}
.song-info { flex: 1; min-width: 0; }
.song-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-artist {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.song-play,
.song-remove {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.song-play {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text2);
}
.song-play:hover { background: rgba(255,255,255,0.1); color: #fff; }
.song-remove {
    background: rgba(239,68,68,0.12);
    color: var(--danger);
}
.song-remove:hover { background: rgba(239,68,68,0.25); }

/* ═══════════════════════════════════════════
   FORM
   ═══════════════════════════════════════════ */
.personalize-section {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.personalize-section h3 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 6px;
    font-weight: 600;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border 0.15s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* ═══════════════════════════════════════════
   THEME GRID
   ═══════════════════════════════════════════ */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.theme-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.theme-cell:hover { background: rgba(255,255,255,0.07); }
.theme-cell.active { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }
.theme-preview {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
}
.theme-check {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.theme-cell.pro {
    opacity: 0.85;
    position: relative;
}
.theme-cell.pro:hover { opacity: 1; }
.theme-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1;
    pointer-events: none;
}

.theme-name {
    font-size: 9.5px;
    color: var(--text2);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.theme-cell.active .theme-name { color: #fff; }

/* ═══════════════════════════════════════════
   SUBMIT (Sticky)
   ═══════════════════════════════════════════ */
.submit-bar {
    position: sticky;
    bottom: 80px;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}
.submit-bar > * { pointer-events: auto; }

/* ═══════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════ */
.page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 14px;
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-back {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.page-back:hover { background: rgba(255,255,255,0.1); }
.page-title {
    flex: 1;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.page-subtitle {
    font-size: 11px;
    color: var(--muted);
    direction: ltr;
    text-align: right;
    font-family: 'SF Mono', monospace;
}
.page-action {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.15s;
}
.page-action:hover { background: rgba(255,255,255,0.1); }

/* ═══════════════════════════════════════════
   GIFT PAGE
   ═══════════════════════════════════════════ */
.gift-page {
    min-height: 100vh;
    background: #121212;
    color: #fff;
    padding-bottom: 100px;
}
.gift-hero {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 60px 20px 26px;
    background: linear-gradient(180deg,
        rgba(var(--c1-rgb, 231,76,60), 0.9) 0%,
        rgba(var(--c1-rgb, 231,76,60), 0.4) 60%,
        #121212 100%);
}
.gift-art {
    width: 140px; height: 140px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}
.gift-info { flex: 1; min-width: 0; }
.gift-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    display: block;
    margin-bottom: 6px;
}
.gift-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 8px;
}
.gift-from {
    font-size: 13px;
    opacity: 0.75;
    margin: 0 0 4px;
}
.gift-message {
    font-size: 12px;
    opacity: 0.55;
    font-style: italic;
    line-height: 1.5;
    margin: 4px 0 0;
}

.gift-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    flex-direction: row-reverse;
}
.gift-play {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--c1, #e74c3c);
    color: #000;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gift-play:hover { transform: scale(1.06); filter: brightness(1.1); }
.gift-shuffle {
    padding: 8px;
    color: #aaa;
    font-size: 18px;
    transition: color 0.2s;
}
.gift-shuffle:hover { color: #fff; }
.gift-shuffle.active { color: var(--c1, #e74c3c); }
.gift-create-btn {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    margin-right: auto;
    transition: all 0.2s;
}
.gift-create-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* Tracklist */
.tracklist { padding: 0; }
.track-item {
    display: flex;
    align-items: center;
    height: 58px;
    padding: 0 10px;
    margin: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
}
.track-item:last-child { border-bottom: none; }
.track-item:hover { background: rgba(255,255,255,0.04); }
.track-item.active {
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.track-num {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
}
.track-index {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
}
.track-item.active .track-index { display: none; }
.track-eq { display: none; align-items: flex-end; gap: 2px; height: 16px; }
.track-item.active .track-eq { display: flex; }
.eq-bar {
    width: 3px;
    background: var(--c1, #e74c3c);
    border-radius: 2px;
    animation: eq-pulse 1s ease-in-out infinite;
}
.eq-bar:nth-child(1) { animation-delay: 0s; }
.eq-bar:nth-child(2) { animation-delay: 0.15s; }
.eq-bar:nth-child(3) { animation-delay: 0.3s; }
.eq-bar:nth-child(4) { animation-delay: 0.45s; }
.track-item.paused .eq-bar { animation-play-state: paused; }
.track-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.track-name {
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-item.active .track-name { color: var(--c1, #e74c3c); }
.track-artist {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-time {
    width: 50px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-variant-numeric: tabular-nums;
}

/* Gift splash (before open) */
.splash-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    background: #121212;
}
.splash-content { animation: fade-up 0.6s ease; }
.splash-emoji { font-size: 80px; margin-bottom: 20px; display: block; }
.splash-title {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}
.splash-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 30px;
}

/* ═══════════════════════════════════════════
   MINI PLAYER
   ═══════════════════════════════════════════ */
.mini-player {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #181818;
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 996;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.mini-player.active { transform: translateY(0); }
.mini-progress {
    height: 3px;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    direction: ltr;
}
.mini-fill {
    height: 100%;
    background: var(--c1, #e74c3c);
    width: 0%;
    transition: width 0.12s linear;
}
.mini-body {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
}
.mini-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.mini-art {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--c1, #e74c3c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.mini-text { min-width: 0; flex: 1; }
.mini-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-artist {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.mini-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    color: #bbb;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.mini-btn:hover { color: #fff; }
.mini-play {
    width: 40px; height: 40px;
    background: #fff;
    color: #000;
    font-size: 15px;
}
.mini-play i { color: #000; }

/* ═══════════════════════════════════════════
   FULLSCREEN PLAYER
   ═══════════════════════════════════════════ */
.fs-player {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}
.fs-player.active { display: block; }
.fs-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    animation: fade-in 0.3s ease;
}
.fs-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    height: 75vh;
    background: #181818;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.fs-player.active .fs-panel { transform: translateY(0); }
.fs-handle {
    width: 40px; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}
.fs-head {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.fs-head-title {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.fs-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fs-body {
    flex: 1;
    padding: 0 30px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    overflow-y: auto;
}
.fs-art {
    width: 180px; height: 180px;
    border-radius: 20px;
    background: var(--c1, #e74c3c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.fs-info { text-align: center; }
.fs-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.fs-artist {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}
.fs-progress { width: 100%; }
.fs-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    cursor: pointer;
    direction: ltr;
    overflow: hidden;
}
.fs-fill {
    height: 100%;
    background: var(--c1, #e74c3c);
    width: 0%;
    border-radius: 2px;
    transition: width 0.12s linear;
}
.fs-time {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-family: 'SF Mono', monospace;
    direction: ltr;
}
.fs-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
    position: relative;
}
.fs-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    position: relative;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.fs-btn:focus,
.fs-btn:active {
    outline: none;
    box-shadow: none;
}
.fs-btn:hover { background: rgba(255,255,255,0.12); }
/* دکمه تکرار — کاملاً جدا از flow، چپ */
#fsRepeat {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}
#fsRepeat:hover,
#fsRepeat:focus,
#fsRepeat:active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}
.fs-btn.repeat-one::after {
    content: '1';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 900;
    color: currentColor;
    line-height: 1;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    pointer-events: none;
    text-shadow: 0 0 4px #0a0a0a, 0 0 4px #0a0a0a, 0 0 4px #0a0a0a;
}

.fs-play {
    width: 64px; height: 64px;
    background: #fff;
    color: #000;
    font-size: 22px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.fs-play:focus,
.fs-play:active {
    outline: none;
    box-shadow: none;
    background: #fff;
}
.fs-play i { color: #000; }

/* ═══════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    padding: 5px;
    background: rgba(18,18,18,0.9);
    backdrop-filter: blur(24px);
    border-radius: 100px;
    border: 0.5px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 997;
    transition: transform 0.3s ease;
}
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 72px;
    height: 46px;
    border-radius: 28px;
    color: #888;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    text-decoration: none;
}
.nav-btn i {
    font-size: 17px;
    line-height: 1;
    transition: transform 0.35s;
}
.nav-btn span {
    font-size: 9.5px;
    line-height: 1;
}
.nav-btn.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    animation: nav-pop 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}
.nav-btn.active i { transform: scale(1.15); color: #fff; }
.nav-btn:not(.active):hover { color: #ccc; }

/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.modal-overlay.show { opacity: 1; }
.modal-box {
    background: #1c1c22;
    border-radius: 20px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.show .modal-box { transform: translateY(0); }
.modal-icon {
    font-size: 48px;
    margin-bottom: 14px;
    line-height: 1;
}
.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.modal-sub {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 20px;
}
.modal-actions {
    display: flex;
    gap: 8px;
}
.modal-actions .btn-primary,
.modal-actions .btn-secondary { flex: 1; padding: 12px 16px; font-size: 14px; }
.modal-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    outline: none;
    margin-bottom: 14px;
}
.modal-input:focus { border-color: var(--primary); }

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2a2a35;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes eq-pulse {
    0%, 100% { height: 6px; }
    50% { height: 16px; }
}
@keyframes nav-pop {
    0% { transform: scale(0.9); }
    40% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .gift-hero { padding: 50px 16px 22px; gap: 14px; }
    .gift-art { width: 120px; height: 120px; font-size: 50px; }
    .gift-title { font-size: 22px; }
    .fs-art { width: 150px; height: 150px; font-size: 58px; }
    .theme-grid { grid-template-columns: repeat(5, 1fr); }
}


/* ============================================ */
/* GIFT PREVIEW OVERLAY */
/* ============================================ */
.gift-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    animation: gpoFadeIn 0.25s ease;
}
.gift-preview-badge {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11.5px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: gpoBadgeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.gift-preview-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.7);
    animation: gpoDot 1.6s ease-in-out infinite;
}
.gift-preview-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}
.gift-preview-close:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}
.gift-preview-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@keyframes gpoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes gpoBadgeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes gpoDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}
@media (max-width: 480px) {
    .gift-preview-overlay { max-width: 100%; }
}


/* ============================================ */
/* MODALS V2 — سیستم مودال مرکزی */
/* ============================================ */
.modal-overlay-v2 {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.modal-overlay-v2.show { opacity: 1; }

.modal-box-v2 {
    background: #1c1c22;
    border-radius: 20px;
    padding: 30px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-overlay-v2.show .modal-box-v2 { transform: scale(1); }

.modal-icon-v2 {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
    line-height: 1;
}
.modal-title-v2 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}
.modal-message-v2 {
    font-size: 13px;
    color: #9ba3b8;
    line-height: 1.7;
    margin: 0 0 22px;
}
.modal-input-v2 {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    margin-bottom: 18px;
    text-align: center;
    transition: all 0.15s;
}
.modal-input-v2:focus {
    border-color: #6366f1;
    background: rgba(255,255,255,0.06);
}

.modal-actions-v2 { display: flex; gap: 8px; }
.modal-btn-v2 {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.modal-btn-v2.secondary {
    background: rgba(255,255,255,0.05);
    color: #ccc;
}
.modal-btn-v2.secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

.modal-btn-v2.primary {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    box-shadow: 0 6px 18px rgba(99,102,241,0.25);
}
.modal-btn-v2.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.modal-btn-v2.danger { background: #ef4444; color: #fff; }
.modal-btn-v2.danger:hover { background: #dc2626; }

.modal-btn-v2.success { background: #22c55e; color: #fff; }
.modal-btn-v2.success:hover { background: #16a34a; }