:root {
    /* ★ Dark Mode Variables ONLY */
    --bg-main: #000000;
    --bg-card: #1C1C1E;
    --bg-input: #2C2C2E;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --accent: #0A84FF;
    --border-dim: rgba(255, 255, 255, 0.12);
    --glass: rgba(28, 28, 30, 0.95);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Kanit', sans-serif;
    padding-bottom: 100px;
    overflow-x: hidden;
    transition: background-image 1s ease;
}

/* Animation Class (Only for Home) */
body.animate-bg {
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Utility for Refresh Spin */
.fa-spin-fast {
    animation: fa-spin 0.5s infinite linear;
}

/* Header & Nav */
.glass-nav {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-dim);
    z-index: 1030;
}

.bottom-nav {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-dim);
    height: 85px;
    padding-bottom: 15px; 
    z-index: 1030;
}

.spacer-top { height: 90px; }

/* Music Card */
.music-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-dim);
    position: relative;
    z-index: 1;
}

.note-bubble {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* History Items */
.history-item {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}
.history-item:active { background: #3a3a3c; transform: scale(0.98); }

.history-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 16px;
    background: #333;
}

/* App Cards */
.app-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-dim);
    transition: transform 0.2s;
}
.app-card:active { transform: scale(0.96); }

.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
}

/* Profile */
.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #333;
    background-image: url('assets/images/profile.jpg'); 
    background-size: cover;
}

/* Inputs */
.form-control::placeholder { color: #636366; }

/* Nav Items */
.nav-item {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: color 0.3s;
    width: 25%;
}
.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    display: block;
}
.nav-item.active { color: var(--accent); }

/* Animation Utils */
.fade-in { animation: fadeIn 0.8s ease; }
.fade-in-up { animation: fadeInUp 0.8s ease; }

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


/* ★ Special Highlight Effect ★ */
.music-card.special-glow {
    border: 2px solid #FFD700 !important; /* ขอบสีทอง */
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4) !important; /* แสงฟุ้งๆ */
    animation: goldPulse 3s infinite ease-in-out; /* ไฟกะพริบช้าๆ */
}

/* เพิ่ม Icon ดาวหมุนๆ ตรงมุม (Optional) */
.music-card.special-glow::after {
    content: "★";
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 2rem;
    color: #FFD700;
    text-shadow: 0 0 10px #FFD700;
    animation: starSpin 5s linear infinite;
    z-index: 10;
}

@keyframes goldPulse {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); transform: scale(1.02); }
    100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
}

@keyframes starSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* About Profile Image */
.about-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.3); /* แสงฟุ้งสีฟ้า */
    margin-bottom: 15px;
    transition: transform 0.3s;
}
.about-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Badge Role */
.role-badge {
    background: rgba(10, 132, 255, 0.15);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Stats Card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    height: 100%;
    transition: transform 0.2s;
}
.stat-card:active { transform: scale(0.95); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Social Buttons */
.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    border: 1px solid var(--border-dim);
    transition: all 0.2s;
    text-decoration: none;
}
.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}


/* ... CSS เดิม ... */

/* Partner Avatar Section */
.partner-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* เส้นคั่นบางๆ */
}

.partner-avatar-container {
    width: 80px;  /* ขนาดเล็กกว่าของปอนด์ (120px) หน่อย */
    height: 80px;
    margin: 0 auto 10px; /* จัดกึ่งกลาง */
    position: relative;
}

.partner-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* ทำเป็นวงกลม */
    object-fit: cover; /* ★ คีย์สำคัญ: เอารูปมาครอปใส่ให้เต็มวงกลมพอดี */
    border: 2px solid rgba(255, 255, 255, 0.3); /* ขอบบางๆ */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* เงาเล็กน้อย */
}


/* --- Equal Profile Styles --- */

/* 1. บังคับรูปทั้งคู่ให้ขนาดเท่ากัน */
.about-avatar, 
.partner-avatar-container {
    width: 100px !important; 
    height: 100px !important;
}

/* 2. ปรับ Container ของ Partner ให้จัดกึ่งกลาง */
.partner-avatar-container {
    margin: 0 auto 10px;
    position: relative;
    padding: 0; /* ล้างค่าเก่า */
}

/* 3. ปรับสไตล์รูป Partner ให้เหมือนรูป Profile หลัก (มีขอบ มีเงา) */
.partner-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent); /* ใช้สีเดียวกับปอนด์ */
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.3); /* เงาฟุ้งๆ เหมือนกัน */
}