:root {
    --bg-color: #030305;
    --card-bg: rgba(18, 18, 24, 0.75);
    --card-hover: rgba(28, 28, 38, 0.85);
    --text-main: #f4f4f6;
    --text-muted: #9898a6;
    --accent-glow: #8b5cf6;
    --accent-cyan: #06b6d4;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(139, 92, 246, 0.4);
    --font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 140px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; cursor: pointer; }

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 50px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.logo-container:hover { transform: scale(1.02); }

.logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.logo-text {
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 30%, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.nav-links a { transition: color 0.2s ease; cursor: pointer; }
.nav-links a:hover { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(6, 182, 212, 0.4); }

.login-btn {
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-cyan));
    color: #fff;
    padding: 9px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(6, 182, 212, 0.5);
}

.hero {
    text-align: center;
    padding: 70px 20px 40px 20px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.08);
    color: #d8b4fe;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
    box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.1);
}

h1 {
    font-size: 50px;
    font-weight: 800;
    letter-spacing: -2px;
    max-width: 750px;
    margin: 0 auto 20px auto;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff 60%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#mainContentWrapper, .creators-wrapper, .profile-container {
    animation: pageTransition 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageTransition {
    from { opacity: 0; transform: translateY(12px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.creators-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: none;
}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.creator-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.creator-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.15);
}

.creator-banner {
    height: 80px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.2));
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.creator-avatar-container {
    position: absolute;
    bottom: -22px;
    left: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    background: var(--card-bg);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.creator-avatar-container img, .creator-avatar-container .avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-cyan));
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.creator-info {
    padding: 30px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.creator-card-name { font-size: 16px; font-weight: 700; color: #fff; }
.creator-card-stats { font-size: 13px; font-weight: 600; color: var(--text-main); display: flex; gap: 16px; margin-top: 4px; }
.creator-card-stats span { color: var(--text-muted); font-weight: 400; font-size: 12px; }

.profile-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    display: none;
}

.profile-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    position: relative;
    margin-bottom: 30px;
}

.profile-banner-large {
    height: 140px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.25));
    position: relative;
}

.back-to-home {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 7px 15px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.back-to-home:hover { background: rgba(255,255,255,0.1); border-color: var(--accent-cyan); }

.profile-content-area { padding: 0 35px 30px 35px; position: relative; }

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--card-bg);
    position: absolute;
    top: -45px;
    left: 35px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-cyan));
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    z-index: 5;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }

.profile-header-details { 
    margin-top: 65px; 
    margin-bottom: 24px; 
}

.profile-name { font-size: 26px; font-weight: 800; }
.profile-role { font-size: 12px; color: var(--accent-cyan); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; margin-top: 4px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.stat-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    transition: border-color 0.2s;
}
.stat-box:hover { border-color: rgba(255,255,255,0.15); }

.stat-value { font-size: 22px; font-weight: 800; color: #fff; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.library-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.search-container {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.search-container:focus-within {
    border-color: var(--accent-glow);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.search-container input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 15px;
    width: 100%;
    outline: none;
}

.filter-tabs { display: flex; gap: 10px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 6px; }

.filter-tab {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    white-space: nowrap;
}

.filter-tab:hover { border-color: var(--text-muted); color: var(--text-main); transform: translateY(-1px); }
.filter-tab.active { 
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-cyan));
    color: #fff; 
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.library-box {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.library-header-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.audio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 15px;
    cursor: pointer;
}

.audio-row:hover {
    background-color: var(--card-hover);
    transform: translateX(4px);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.track-left { display: flex; align-items: center; gap: 16px; min-width: 320px; }

.track-cover {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #1e1e26, #121216);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}
.audio-row:hover .track-cover { transform: scale(1.05); border-color: var(--accent-cyan); }

.track-details .title { font-size: 14px; font-weight: 600; color: var(--text-main); }
.track-details .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.tag-group { display: flex; gap: 8px; align-items: center; }

.tag {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    text-transform: uppercase;
}

.tag.uploader {
    color: var(--accent-cyan);
    border-color: rgba(6, 182, 212, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}
.tag.uploader:hover { background: rgba(6, 182, 212, 0.15); }

.download-info-group { display: flex; align-items: center; gap: 14px; }
.download-counter { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.download-action {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.download-action:hover {
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-cyan));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }

.page-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent-cyan); background: rgba(255,255,255,0.06); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.bottom-player {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 750px;
    background: rgba(14, 14, 20, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    padding: 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 30px rgba(139, 92, 246, 0.15);
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.bottom-player.active { bottom: 25px; }

.player-top-row { display: flex; align-items: center; justify-content: space-between; }
.player-info { display: flex; align-items: center; gap: 12px; }
.player-title { font-weight: 700; font-size: 14px; color: #fff; }
.player-subtitle { font-size: 11px; color: var(--accent-cyan); font-weight: 600; letter-spacing: 0.5px; }

.main-play-btn {
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-cyan));
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s;
}
.main-play-btn:hover { transform: scale(1.08); }

.player-progress-area { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.seekbar {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.08);
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.seekbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px var(--accent-cyan);
    cursor: pointer;
    transition: transform 0.1s;
}
.seekbar::-webkit-slider-thumb:hover { transform: scale(1.2); }

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

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes slideInFade {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.player-info.animate {
    animation: slideInFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
