.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;
}

.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, .card-player-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-player-content {
    background: rgba(0,0,0,0.95);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.card-player-content.active {
    opacity: 1;
    pointer-events: auto;
}

audio { width: 90%; height: 36px; }

.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 {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-stop {
    flex: 1;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.btn-downloading {
    flex: 1;
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    cursor: default;
}

.btn-play {
    background: rgba(255, 255, 255, 0.05);
    color: #1dc881;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-play:hover { background: rgba(255,255,255,0.1); }

.btn-save { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); max-width: 40px; }
.btn-save:hover { background: rgba(59, 130, 246, 0.3); }

.btn-delete { background: transparent; color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); max-width: 40px; }
.btn-delete:hover { background: rgba(239, 68, 68, 0.1); }

.btn-share-x {
    background: rgba(29, 155, 240, 0.1);
    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 {
    flex: 1;
    background: rgba(239,68,68,0.1);
    border: none;
}

.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); }

.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 blink-anim {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@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); }
}

.custom-live-icon {
    font-size: 50px !important;
    color: #ef4444 !important;
    animation: blink-anim 1.5s infinite ease-in-out;
}

.custom-static-icon {
    font-size: 50px !important;
    color: #3b82f6 !important;
}

.blink-btn {
    animation: btn-blink 1.5s infinite ease-in-out;
    border: 1px solid rgba(239,68,68,0.4) !important;
}

@keyframes blink-stop {
    0% { opacity: 1; text-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
    50% { opacity: 0.3; text-shadow: none; }
    100% { opacity: 1; text-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
}

.icon-blink {
    animation: blink-stop 1.5s infinite ease-in-out;
}

.share-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 86px;
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
    z-index: 2;
}

.share-card {
    background: rgba(22, 24, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 50px rgba(29, 155, 240, 0.15);
}

.img-area {
    width: 130px;
    height: 130px;
    margin: 0 auto 25px;
}

.cover-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #000;
    box-shadow: 0 0 0 2px #333;
}

.share-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.4;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #71767b;
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 500;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hashtag-box {
    background: rgba(29, 155, 240, 0.1);
    color: #e7e9ea;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 1rem;
    border: 1px solid rgba(29, 155, 240, 0.2);
}

.hashtag {
    color: #1d9bf0;
    font-weight: 700;
    text-decoration: none;
}

.player-wrap {
    margin-bottom: 30px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    padding: 15px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.2s;
}

.action-btn:hover {
    background: #dcdfe1;
}

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