@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Default Black Theme */
    --bg-body: #111111;
    --bg-content: #0d0d0d;
    --bg-card: #1d1d1d;
    --bg-hover: #262626;
    --text-main: #fdfafb;
    --text-muted: #a2a2a2;
    --primary: #fa656c;
    --primary-hover: #e55359;
    --border-color: rgba(255, 255, 255, 0.05);
    --green: #4ade80;
    --red: #f87171;
    --font-heading: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
}

/* Ruby Red Theme*/
body.theme-ruby {
    --bg-body: #1a0505;
    --bg-content: #240a0a;
    --bg-card: #360f0f;
    --bg-hover: #4a1515;
    --text-main: #fff0f0;
    --text-muted: #ffb3b3;
    --primary: #ff4d4d;
    --primary-hover: #ff1a1a;
    --border-color: rgba(255, 77, 77, 0.15);
}

/* White Theme */
body.theme-white {
    --bg-body: #f4f4f9;
    --bg-content: #ffffff;
    --bg-card: #f8f9fa;
    --bg-hover: #e9ecef;
    --text-main: #212529;
    --text-muted: #6c757d;
    --primary: #e63946;
    --primary-hover: #d62828;
    --border-color: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Top Navbar */
.top-bar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(20px, 5vw, 60px);
    z-index: 1000;
    background: var(--bg-content);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(219, 214, 214, 0.049);
}

.brand-logo {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    gap: 10px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-item:hover { color: var(--text-main); background: var(--bg-hover); }
.nav-item.active { background: var(--primary); color: #fff; }

.settings-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.theme-select {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(20px, 5vw, 60px);
    padding-top: 170px;
}

/* Left Sidebar */
.left-block { position: sticky; top: 100px; height: fit-content; }

.info-card {
    background-color: var(--bg-content);
    padding: 40px 20px 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    margin-top: 60px;
}

.photo-box {
    width: 180px; height: 180px;
    margin: 0 auto;
    border-radius: 20px;
    position: absolute;
    top: -70px; left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 3px solid var(--bg-content);
}

.photo-box img { width: 100%; height: 100%; object-fit: cover; }

.p-name { font-size: 1.5rem; font-weight: 700; margin-top: 40px; margin-bottom: 5px; }

.p-title {
    color: var(--primary);
    font-size: 1rem;
    background: var(--bg-card);
    padding: 4px 12px;
    border-radius: 30px;
    display: inline-block;
    margin-top: 40px;
    margin-bottom: 10px;
}

/* Stream Links */
.stream-section { margin-top: 25px; text-align: left; }
.stream-section h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }

.stream-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 10px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}
.stream-link:hover { transform: translateY(-2px); border-color: var(--primary); }
.stream-icon { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; font-size: 1.1rem; }
.spotify-bg { background: #1DB954; }
.yt-bg { background: #FF0000; }
.sh-bg { background: #6b21a8; }
.stream-text { display: flex; flex-direction: column; }
.stream-title { font-size: 0.9rem; font-weight: 600; }
.stream-sub { font-size: 0.75rem; color: var(--text-muted); }

/* Main Content */
.main-content {
    background-color: var(--bg-content);
    padding: clamp(20px, 4vw, 40px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.m-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 30px; }
.section-label { font-size: 1.3rem; font-weight: 600; margin: 30px 0 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }

/* Global Songs Cards */
.global-songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.g-song-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}
.g-song-card:hover { border-color: var(--primary); transform: translateY(-3px); }

.sc-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sc-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.sc-spotify-link { color: #1DB954; font-size: 1.5rem; transition: var(--transition); }
.sc-spotify-link:hover { transform: scale(1.1); }

.sc-mid-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 10px;
}
.sc-rank { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.sc-name { font-size: 1.1rem; font-weight: 600; text-align: right; }

.sc-bot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.85rem;
}
.sc-streams { color: var(--text-muted); }

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.stat-card h4 { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.stat-card .val { font-size: 1.5rem; font-weight: 700; }
.stat-card .trend { font-size: 0.85rem; margin-top: 5px; }

/* Tables */
.table-wrapper { overflow-x: auto; margin-bottom: 30px; }
table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
th { text-align: left; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; padding: 12px; }
td { padding: 16px 12px; font-size: 0.9rem; background: var(--bg-card); }
tr { transition: var(--transition); }
tr:hover td { background: var(--bg-hover); }
td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
td a { color: var(--text-main); text-decoration: none; font-weight: 500; }
td a:hover { color: var(--primary); }

.up { color: var(--green); }
.down { color: var(--red); }
.neutral { color: var(--text-muted); }

/* Footer */
.site-footer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background: var(--bg-content);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}
.contact-links { display: flex; justify-content: center; gap: 20px; margin-top: 15px; }
.contact-links a { color: var(--text-muted); font-size: 1.5rem; transition: var(--transition); }
.contact-links a:hover { color: var(--primary); transform: translateY(-3px); }

/* Responsive */
@media screen and (max-width: 1024px) {
    .main-nav { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: var(--bg-content); padding: 20px; border-bottom: 1px solid var(--border-color); }
    .main-nav.active { display: flex; }
    .mobile-menu-btn { display: block; }
}

@media screen and (max-width: 850px) {
    .main-layout { grid-template-columns: 1fr; }
    .left-block { position: relative; top: 0; }
    .date-pill span { display: none; }
}


























/* SECTION HEADER */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.m-title {
    color: #FFD700;
    font-size: 24px;
    margin: 0;
}

.edit-goal-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-goal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #1DB954;
    color: #1DB954;
}

/* PREMIUM GOAL CARD */
.goal-card-premium {
    background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.goal-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #1DB954, #FFD700);
    opacity: 0.6;
}

.goal-card-premium:hover {
    border-color: #FFD700;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.08);
    transform: translateY(-2px);
}

.goal-card-inner {
    display: flex;
    padding: 24px;
    gap: 24px;
}

/* IMAGE */
.goal-image-container {
    position: relative;
    flex-shrink: 0;
}

.goal-image-container img {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.goal-image-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #1DB954;
    color: #000;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* DETAILS */
.goal-details {
    flex: 1;
    min-width: 0;
}

.goal-label {
    display: inline-block;
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.goal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
}

.goal-numbers {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.current-streams {
    font-size: 28px;
    font-weight: 800;
    color: #1DB954;
    letter-spacing: -0.5px;
}

.separator {
    font-size: 20px;
    color: #555;
    font-weight: 300;
}

.target-streams {
    font-size: 16px;
    color: #888;
    font-weight: 400;
}

/* PROGRESS BAR */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.progress-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1DB954, #1ed760);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
}

.progress-percent {
    font-size: 14px;
    font-weight: 700;
    color: #1DB954;
    min-width: 45px;
    text-align: right;
}

.goal-remaining {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.goal-remaining strong {
    color: #FFD700;
    font-weight: 600;
}

/* EDIT FORM */
.edit-form-container {
    margin-top: 20px;
}

.edit-form-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 24px;
}

.edit-form-card h3 {
    color: #1DB954;
    margin: 0 0 20px 0;
    font-size: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1DB954;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-save {
    flex: 1;
    background: #1DB954;
    border: none;
    padding: 12px;
    border-radius: 10px;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save:hover {
    background: #1ed760;
    transform: translateY(-1px);
}

.btn-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 10px;
    color: #ccc;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    border-color: #666;
    color: #fff;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .goal-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .goal-image-container img {
        width: 80px;
        height: 80px;
    }
    
    .current-streams {
        font-size: 22px;
    }
    
    .goal-details {
        text-align: center;
    }
    
    .goal-numbers {
        justify-content: center;
    }
    
    .progress-container {
        justify-content: center;
    }
}






.login-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.login-btn:hover {
    border-color: #1DB954;
    color: #1DB954;
}

.edit-goal-btn {
    background: rgba(29,185,84,0.15);
    border: 1px solid #1DB954;
    color: #1DB954;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
    display: none;
}

.edit-goal-btn:hover {
    background: #1DB954;
    color: #000;
}