.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 55px;
}
.dash-title h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.welcome-text { color: #94a3b8; font-size: 1rem; margin-top: 5px; }
.user-highlight { color: #fff; font-weight: 600; }
.credits-badge {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.download-box {
    background-color: #0f1014;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    max-width: 650px;
    margin: 0 auto 50px auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.input-wrapper { position: relative; width: 100%; }
#dashUrl {
    width: 100%;
    background-color: #16181c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 18px 50px;
    border-radius: 12px;
    font-size: 15px;
    box-sizing: border-box;
    transition: 0.3s;
    height: 56px;
}
#dashUrl:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #000;
}
#dashUrl::placeholder { color: #555; }
.link-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 20px;
    pointer-events: none;
}
.mic-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #0ea5e9;
    font-size: 20px;
    cursor: pointer;
}
.btn-stop  {
margin-top: 20px;
}
.user-btn-download {
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    height: 56px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s, opacity 0.2s;
    text-transform: capitalize;
}
.user-btn-download:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}
.user-btn-download span { font-size: 20px; }
.grid {
    display: grid;
    gap: 20px;
    width: 100%;
    grid-template-columns: 1fr;
}
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.space-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.space-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.card-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}
.card-thumb-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-thumb-content img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.8;
}
.default-thumb-icon {
    font-size: 40px !important;
    color: #3b82f6;
}

.card-status {
    position: absolute;
    top: 10px; right: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    z-index: 5;
}
.status-processing { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.status-completed  { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.status-failed     { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.uploader-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 5px;
}
.user-icon-sm { font-size: 14px !important; }
.calendar-icon-sm { font-size: 14px !important; }
.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 5px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}
.card-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}
.card-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}
.card-actions .btn-stop {
    flex: 0 0 100%;
    width: 100%;
    margin-bottom: 4px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #201616;
    border: 2px solid #e24343;
    color: #e24343;
    border-radius: 10px;
    font-weight: 700;
    padding: 0 18px 0 0;
    height: 38px;
    min-width: 72px;
    transition: background 0.15s, border 0.15s;
    gap: 7px;
    animation: btn-blink 1.5s infinite ease-in-out;
    border: 1px solid rgba(239,68,68,0.4) !important;
}
@keyframes btn-blink {
    0% { opacity: 1; box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);}
    50% { opacity: 0.7; box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);}
    100% { opacity: 1; box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);}
}
.card-actions .btn-stop:hover {
    background: #e24343;
    color: #fff;
    border-color: #e24343;
}
.stop-icon-rounded {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e24343;
    color: #fff;
    border-radius: 8px;
    width: 36px;
    height: 28px;
    font-size: 1.3rem;
    margin-right: 7px;
    margin-left: -5px;
}
.card-actions .action-btn:not(.btn-stop),
.card-actions a.action-btn {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
    min-width: 0;
    height: 32px;
    font-size: 0.8rem;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 7px;
    margin: 0;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    transition: 0.2s;
}
.card-actions .action-btn:not(.btn-stop):hover,
.card-actions a.action-btn:hover { background: #dcdfe1; }

.btn-downloading {
    background: #7c3aed !important;
    color: #fff !important;
    cursor: default !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 10px 26px !important;
    width: auto !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.btn-play {
    background: #1dc881;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-play:hover { background: rgba(255,255,255,0.10); }
.btn-save { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3);}
.btn-save:hover { background: rgba(59, 130, 246, 0.3); }
.btn-delete {
    background: #6f2c2c;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-delete:hover { background: rgba(239, 68, 68, 0.1); }
.btn-share-x {
    background: #212325;
    color: #1d9bf0;
    border: 1px solid rgba(29, 155, 240, 0.2);
}
.btn-share-x:hover { background: #1d9bf0; }
.x-logo-icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(180deg);
}
.btn-remove-list { background: rgba(239,68,68,0.1); border: none; }
.loading-pulse {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
}
.loading-pulse::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 5px;
    grid-column: 1 / -1;
}
.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    text-decoration: none;
}
.page-btn.active { background: #3b82f6; color: #fff; }
.page-btn:hover:not(.active) { background: rgba(255,255,255,0.1); }

/* Player */
#fs-player-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.75); display: none;
    align-items: center; justify-content: center; z-index: 9999;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

.fs-player-modal {
    width: 90%; max-width: 420px; border-radius: 28px;
    padding: 30px 25px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(354deg, var(--primary), #0ea5e9);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.fs-player-modal::before {
    content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c, #ff9a9e);
    border-radius: 30px; z-index: -1;
    filter: blur(15px); opacity: 0.7;
}

.fsp-cover {
    width: 65%; padding-top: 65%; margin: 0 auto 25px auto;
    border-radius: 20px; background-size: cover; background-position: center;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    border: 4px solid rgba(255,255,255,0.2);
}

.fsp-title {
    font-size: 1.4em; font-weight: 800; color: #ffffff; margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.fsp-uploader {
    font-size: 1em; color: rgba(255,255,255,0.9); margin-bottom: 30px;
    font-weight: 500;
}

.fsp-timeline {
    display: flex; align-items: center; gap: 15px;
}

.fsp-time {
    font-size: 13px; color: rgba(255,255,255,0.8); font-family: monospace; font-weight: 600;
}

.fsp-progress-container {
    flex-grow: 1; height: 10px; background-color: rgba(255,255,255,0.25);
    border-radius: 5px; cursor: pointer; position: relative; overflow: visible;
    backdrop-filter: blur(5px);
}

.fsp-progress-bar {
    position: absolute; left: 0; top: 0; width: 0%; height: 100%;
    background: linear-gradient(90deg, #ffffff, #ffe0b3);
    border-radius: 5px; pointer-events: none;
    box-shadow: 0 0 20px rgba(255,255,255,0.7);
}

.fsp-progress-handle {
    position: absolute; top: 50%; left: 0%; transform: translate(-50%, -50%);
    width: 32px; height: 32px; background-color: #ffffff;
    border-radius: 50%; box-shadow: 0 8px 25px rgba(0,0,0,0.7);
    pointer-events: none; z-index: 30;
    border: 5px solid #ffffff;
}

.fsp-progress-handle::before {
    content: ''; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px;
    background: linear-gradient(135deg, #ff9a9e, #f5576c, #f093fb);
    border-radius: 50%;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.fsp-controls {
    display: flex; justify-content: center; align-items: center;
    margin-top: 30px; gap: 30px;
}

.fsp-btn {
    background: rgba(255,255,255,0.15); border: none; cursor: pointer;
    padding: 14px; border-radius: 50%; transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fsp-btn:hover {
    background: rgba(255,255,255,0.3); transform: scale(1.1);
}

.fsp-btn .material-symbols-rounded {
    font-size: 32px; color: #ffffff; vertical-align: middle;
}

.fsp-btn.play-pause .material-symbols-rounded {
    font-size: 56px; color: #ffffff;
}

#fsp-close-btn {
    position: absolute; top: 18px; right: 18px;
    background: rgba(255,255,255,0.2); border: none;
    border-radius: 50%; width: 38px; height: 38px;
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px); transition: all 0.3s ease;
}

#fsp-close-btn:hover {
    background: rgba(255,255,255,0.4); transform: scale(1.1);
}

#fsp-close-btn .material-symbols-rounded {
    font-size: 24px;
}

@media (max-width: 780px) {
    .fs-player-modal {
        max-width: 90%; padding: 25px 20px;
    }
    .fsp-cover {
        width: 75%; padding-top: 75%;
    }
    .fsp-progress-container {
        height: 12px;
    }
    .fsp-progress-handle {
        width: 36px; height: 36px;
    }
    .fsp-progress-handle::before {
        top: 5px; left: 5px; right: 5px; bottom: 5px;
    }
}
