.note-composer {
    position: relative;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 8px rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.2);
}

#myNoteContent {
    width: 100%;
    padding: 1rem;
    background-color: rgba(var(--rgb-theme-color), 0.08);
    border: 1px solid rgba(var(--rgb-theme-color), 0.3);
    color: var(--theme-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 60px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 1.05rem;
}

#myNoteContent:focus {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2), 0 0 15px rgba(var(--rgb-theme-color), 0.5);
    border-color: rgba(var(--rgb-theme-color), 0.6);
    background-color: rgba(var(--rgb-theme-color), 0.12);
}

.glow-btn {
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid var(--theme-color);
    color: var(--theme-color);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(var(--rgb-theme-color), 0.2);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.glow-btn:hover {
    background: rgba(var(--rgb-theme-color), 0.25);
    box-shadow: 0 0 15px rgba(var(--rgb-theme-color), 0.4);
    transform: translateY(-2px);
}

/* Note Expiration Styling */
.note-expiration-wrapper {
    position: relative;
    margin-top: 0.8rem;
    width: 100%;
}

.note-expiration-select {
    appearance: none;
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: rgba(var(--rgb-theme-color), 0.08);
    border: 1px solid rgba(var(--rgb-theme-color), 0.3);
    color: var(--theme-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
    cursor: pointer;
}

.note-expiration-select:focus {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 12px rgba(var(--rgb-theme-color), 0.5);
    border-color: rgba(var(--rgb-theme-color), 0.6);
    background-color: rgba(var(--rgb-theme-color), 0.12);
}

.note-expiration-select:hover {
    background-color: rgba(var(--rgb-theme-color), 0.12);
    border-color: rgba(var(--rgb-theme-color), 0.4);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    pointer-events: none;
    border-right: 2px solid var(--theme-color);
    border-bottom: 2px solid var(--theme-color);
    transform: translateY(-50%) rotate(45deg);
    transition: all 0.3s ease;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.note-expiration-select:focus + .select-arrow {
    border-right: 2px solid rgba(var(--rgb-theme-color), 0.8);
    border-bottom: 2px solid rgba(var(--rgb-theme-color), 0.8);
    box-shadow: 2px 2px 6px rgba(var(--rgb-theme-color), 0.4);
}

/* For Webkit browsers (Chrome, Safari) */
.note-expiration-select::-webkit-scrollbar {
    width: 8px;
}

.note-expiration-select::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

.note-expiration-select::-webkit-scrollbar-thumb {
    background: var(--theme-color);
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.6);
}

/* Custom styling for the dropdown options in webkit browsers */
.note-expiration-select option {
    background-color: rgba(0, 20, 16, 0.95) !important;
    color: var(--theme-color) !important;
    padding: 8px;
}

/* Enhanced Friend Notes Section */
.fnotes-section {
    position: relative;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.6);
    margin-bottom: 2.5rem;
}

.fnotes-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.fnotes-section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.7);
    letter-spacing: 1px;
}

/* Carousel Indicators */
.fnotes-indicators {
    display: flex;
    gap: 8px;
}

.fnotes-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(var(--rgb-theme-color), 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fnotes-indicator.active {
    width: 20px;
    border-radius: 10px;
    background-color: var(--theme-color);
    box-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.7);
}

/* Carousel Container */
.fnotes-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

/* Carousel Wrapper */
.fnotes-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    perspective: 1000px;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, transparent 100%);
    border-radius: 10px;
}

/* Carousel */
.fnotes-carousel {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    gap: 25px;
    padding: 1rem 0;
}

/* ─── LIGHT THEME ──────────────────────────────────────────── */
body.light-theme .notes-container,
body.light-theme .fnotes-container,
body.light-theme .notes-list,
body.light-theme .note-creation-section {
    background: #ffffff;
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.60);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.09);
}

body.light-theme .note-card,
body.light-theme .fnote-card {
    background: #ffffff;
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.58);
    color: #1a1a2e;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.14), 0 2px 5px rgba(0, 0, 0, 0.08);
}

body.light-theme .note-card:hover,
body.light-theme .fnote-card:hover {
    box-shadow: 0 8px 28px rgba(var(--rgb-theme-color), 0.30), 0 3px 8px rgba(0, 0, 0, 0.12);
    border-color: rgba(var(--rgb-theme-color), 0.75);
}

body.light-theme .note-title,
body.light-theme .note-content,
body.light-theme .note-header {
    color: #1a1a2e;
}

body.light-theme .note-meta,
body.light-theme .note-date,
body.light-theme .note-expiry {
    color: #6666aa;
}

body.light-theme .note-input,
body.light-theme .note-title-input,
body.light-theme .note-content-input {
    background: #f5f5ff;
    color: #1a1a2e;
    border-color: rgba(var(--rgb-theme-color), 0.3);
}

body.light-theme .note-expiration-select {
    background: #f5f5ff;
    color: #1a1a2e;
    border-color: rgba(var(--rgb-theme-color), 0.3);
}

body.light-theme .note-expiration-select option {
    background: #ffffff;
    color: #1a1a2e;
}

/* Note composer (MY HEADLINE textarea container) */
body.light-theme .note-composer {
    background: #ffffff;
    border-color: rgba(var(--rgb-theme-color), 0.55);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13), 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.light-theme #myNoteContent {
    background-color: #f5f5ff;
    color: #1a1a2e;
    border-color: rgba(var(--rgb-theme-color), 0.4);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.07);
}

body.light-theme #myNoteContent:focus {
    background-color: #ffffff;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06), 0 0 12px rgba(var(--rgb-theme-color), 0.35);
    border-color: rgba(var(--rgb-theme-color), 0.65);
}

/* Headline arrow buttons */
body.light-theme .fnotes-arrow {
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15), 0 0 5px rgba(var(--rgb-theme-color), 0.2);
    border: 2px solid rgba(var(--rgb-theme-color), 0.6);
}

body.light-theme .fnotes-arrow:hover {
    background: rgba(var(--rgb-theme-color), 0.12);
    box-shadow: 0 8px 24px rgba(var(--rgb-theme-color), 0.28), 0 2px 6px rgba(0, 0, 0, 0.10);
}

/* fnotes section container */
body.light-theme .fnotes-section {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.45);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.07);
}

/* Friend note cards — override dark gradient */
body.light-theme .fnote-card {
    background: #ffffff;
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.52);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.13), 0 2px 5px rgba(0, 0, 0, 0.07);
    color: #1a1a2e;
}

body.light-theme .fnote-card.my-note {
    background: linear-gradient(145deg, rgba(var(--rgb-theme-color), 0.10), rgba(var(--rgb-theme-color), 0.04));
    border: 2px solid rgba(var(--rgb-theme-color), 0.60);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14), 0 0 12px rgba(var(--rgb-theme-color), 0.18);
    color: #1a1a2e;
}

body.light-theme .fnote-card.has-music {
    background: linear-gradient(145deg, #f8f8ff, #f0f0f8);
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.48);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
    color: #1a1a2e;
}

/* Music search/waveform panels */
body.light-theme #noteMusicResults {
    background: #f5f5ff !important;
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.45);
    color: #1a1a2e;
}

body.light-theme #noteMusicWaveform {
    background: #f5f5ff !important;
    border: 1.5px solid rgba(var(--rgb-theme-color), 0.40);
}

body.light-theme .note-expiration-select {
    background: #f5f5ff;
    color: #1a1a2e;
}

/* Enhanced Navigation Arrows */
.fnotes-arrow {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--theme-color);
    color: var(--theme-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4), 0 0 5px rgba(var(--rgb-theme-color), 0.3);
    z-index: 10;
    position: absolute;
}

.fnotes-arrow:hover {
    background: rgba(var(--rgb-theme-color), 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(var(--rgb-theme-color), 0.5);
}

.fnotes-prev-arrow {
    left: -5px;
}

.fnotes-next-arrow {
    right: -5px;
}

.fnotes-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(0.9);
    box-shadow: none;
}

.fnotes-arrow svg {
    stroke: var(--theme-color);
    width: 24px;
    height: 24px;
}

/* Enhanced Note Cards - BASE STYLING */
.fnote-card {
    position: relative;
    flex: 0 0 330px;
    min-width: 330px;
    height: auto;
    min-height: 260px;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    transform: scale(0.95) translateY(5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.7), rgba(20, 20, 20, 0.9));
    border: 1px solid rgba(100, 100, 100, 0.3);
    cursor: pointer;
}

.fnote-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at top right, 
                rgba(100, 100, 100, 0.15), 
                transparent 60%);
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.fnote-card:hover {
    transform: scale(1) translateY(-10px) rotateY(-5deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 100, 100, 0.4);
    border-color: rgba(150, 150, 150, 0.5);
}

.fnote-card:hover::before {
    opacity: 1;
}

.fnote-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(150, 150, 150, 0.8), transparent);
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.fnote-card:hover::after {
    opacity: 1;
}

/* MY NOTE STYLING */
.fnote-card.my-note {
    background: linear-gradient(145deg, rgba(0, 50, 40, 0.7), rgba(0, 30, 25, 0.9));
    border: 1px solid rgba(var(--rgb-theme-color), 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--rgb-theme-color), 0.2);
}

.fnote-card.my-note::after {
    background: linear-gradient(90deg, var(--theme-color), rgba(var(--rgb-theme-color), 0.3));
    height: 4px;
    opacity: 0.9;
}

/* MUSIC NOTE STYLING - RGB COLOR CYCLING */
.fnote-card.has-music {
    background: linear-gradient(145deg, 
                rgba(0, 0, 0, 0.8),
                rgba(20, 20, 20, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                0 0 8px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: music-card-rgb-cycle 6s ease-in-out infinite;
}

/* RGB Color Cycling Animation - Slow and Smooth */
@keyframes music-card-rgb-cycle {
    0% {
        border-color: rgba(255, 100, 100, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(255, 100, 100, 0.08);
    }
    16.67% {
        border-color: rgba(255, 200, 100, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(255, 200, 100, 0.08);
    }
    33.33% {
        border-color: rgba(100, 255, 100, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(100, 255, 100, 0.08);
    }
    50% {
        border-color: rgba(100, 255, 255, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(100, 255, 255, 0.08);
    }
    66.67% {
        border-color: rgba(100, 100, 255, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(100, 100, 255, 0.08);
    }
    83.33% {
        border-color: rgba(255, 100, 255, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(255, 100, 255, 0.08);
    }
    100% {
        border-color: rgba(255, 100, 100, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 
                    0 0 8px rgba(255, 100, 100, 0.08);
    }
}

/* Music note gradient overlay with RGB cycling */
.fnote-card.has-music::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.4s ease;
    animation: music-card-bg-cycle 6s ease-in-out infinite;
}

@keyframes music-card-bg-cycle {
    0% {
        background: radial-gradient(circle at top left, 
                    rgba(255, 100, 100, 0.06),
                    rgba(255, 50, 50, 0.03) 40%, 
                    transparent 70%);
    }
    16.67% {
        background: radial-gradient(circle at top left, 
                    rgba(255, 200, 100, 0.06),
                    rgba(255, 150, 50, 0.03) 40%, 
                    transparent 70%);
    }
    33.33% {
        background: radial-gradient(circle at top left, 
                    rgba(100, 255, 100, 0.06),
                    rgba(50, 255, 50, 0.03) 40%, 
                    transparent 70%);
    }
    50% {
        background: radial-gradient(circle at top left, 
                    rgba(100, 255, 255, 0.06),
                    rgba(50, 255, 255, 0.03) 40%, 
                    transparent 70%);
    }
    66.67% {
        background: radial-gradient(circle at top left, 
                    rgba(100, 100, 255, 0.06),
                    rgba(50, 50, 255, 0.03) 40%, 
                    transparent 70%);
    }
    83.33% {
        background: radial-gradient(circle at top left, 
                    rgba(255, 100, 255, 0.06),
                    rgba(255, 50, 255, 0.03) 40%, 
                    transparent 70%);
    }
    100% {
        background: radial-gradient(circle at top left, 
                    rgba(255, 100, 100, 0.06),
                    rgba(255, 50, 50, 0.03) 40%, 
                    transparent 70%);
    }
}

.fnote-card.has-music:hover::before {
    opacity: 0.6;
}

/* Music note top accent line with RGB cycling */
.fnote-card.has-music::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0.8;
    animation: music-card-accent-cycle 6s ease-in-out infinite;
}

@keyframes music-card-accent-cycle {
    0% {
        background: linear-gradient(90deg, 
                    rgba(255, 100, 100, 0.7),
                    rgba(255, 150, 150, 0.4),
                    rgba(255, 200, 200, 0.2));
    }
    16.67% {
        background: linear-gradient(90deg, 
                    rgba(255, 200, 100, 0.7),
                    rgba(255, 220, 150, 0.4),
                    rgba(255, 240, 200, 0.2));
    }
    33.33% {
        background: linear-gradient(90deg, 
                    rgba(100, 255, 100, 0.7),
                    rgba(150, 255, 150, 0.4),
                    rgba(200, 255, 200, 0.2));
    }
    50% {
        background: linear-gradient(90deg, 
                    rgba(100, 255, 255, 0.7),
                    rgba(150, 255, 255, 0.4),
                    rgba(200, 255, 255, 0.2));
    }
    66.67% {
        background: linear-gradient(90deg, 
                    rgba(100, 100, 255, 0.7),
                    rgba(150, 150, 255, 0.4),
                    rgba(200, 200, 255, 0.2));
    }
    83.33% {
        background: linear-gradient(90deg, 
                    rgba(255, 100, 255, 0.7),
                    rgba(255, 150, 255, 0.4),
                    rgba(255, 200, 255, 0.2));
    }
    100% {
        background: linear-gradient(90deg, 
                    rgba(255, 100, 100, 0.7),
                    rgba(255, 150, 150, 0.4),
                    rgba(255, 200, 200, 0.2));
    }
}

.fnote-card.has-music:hover::after {
    height: 4px;
    opacity: 1;
}

/* Music note hover effect - reduced glow */
.fnote-card.has-music:hover {
    transform: scale(1.01) translateY(-8px) rotateY(-2deg);
    animation: music-card-hover-cycle 6s ease-in-out infinite;
}

@keyframes music-card-hover-cycle {
    0% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(255, 100, 100, 0.15);
    }
    16.67% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(255, 200, 100, 0.15);
    }
    33.33% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(100, 255, 100, 0.15);
    }
    50% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(100, 255, 255, 0.15);
    }
    66.67% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(100, 100, 255, 0.15);
    }
    83.33% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(255, 100, 255, 0.15);
    }
    100% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                    0 0 12px rgba(255, 100, 100, 0.15);
    }
}

/* Music icon indicator in top-right corner with RGB cycling */
.fnote-card.has-music .music-corner-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    z-index: 5;
    animation: music-indicator-cycle 6s ease-in-out infinite;
}

@keyframes music-indicator-cycle {
    0% { border: 1px solid rgba(255, 100, 100, 0.4); }
    16.67% { border: 1px solid rgba(255, 200, 100, 0.4); }
    33.33% { border: 1px solid rgba(100, 255, 100, 0.4); }
    50% { border: 1px solid rgba(100, 255, 255, 0.4); }
    66.67% { border: 1px solid rgba(100, 100, 255, 0.4); }
    83.33% { border: 1px solid rgba(255, 100, 255, 0.4); }
    100% { border: 1px solid rgba(255, 100, 100, 0.4); }
}

.fnote-card.has-music:hover .music-corner-indicator {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

/* Header styling for music cards */
.fnote-card.has-music .fnote-header {
    position: relative;
    z-index: 2;
}

/* Avatar styling for music cards with RGB cycling */
.fnote-card.has-music .fnote-avatar {
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    animation: music-avatar-cycle 6s ease-in-out infinite;
}

@keyframes music-avatar-cycle {
    0% { border-color: rgba(255, 100, 100, 0.5); }
    16.67% { border-color: rgba(255, 200, 100, 0.5); }
    33.33% { border-color: rgba(100, 255, 100, 0.5); }
    50% { border-color: rgba(100, 255, 255, 0.5); }
    66.67% { border-color: rgba(100, 100, 255, 0.5); }
    83.33% { border-color: rgba(255, 100, 255, 0.5); }
    100% { border-color: rgba(255, 100, 100, 0.5); }
}

.fnote-card.has-music:hover .fnote-avatar {
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

/* Content area for music cards with RGB cycling */
.fnote-card.has-music .fnote-content {
    background: rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: music-content-cycle 6s ease-in-out infinite;
}

@keyframes music-content-cycle {
    0% {
        border-left-color: rgba(255, 100, 100, 0.2);
        border-top-color: rgba(255, 100, 100, 0.2);
    }
    16.67% {
        border-left-color: rgba(255, 200, 100, 0.2);
        border-top-color: rgba(255, 200, 100, 0.2);
    }
    33.33% {
        border-left-color: rgba(100, 255, 100, 0.2);
        border-top-color: rgba(100, 255, 100, 0.2);
    }
    50% {
        border-left-color: rgba(100, 255, 255, 0.2);
        border-top-color: rgba(100, 255, 255, 0.2);
    }
    66.67% {
        border-left-color: rgba(100, 100, 255, 0.2);
        border-top-color: rgba(100, 100, 255, 0.2);
    }
    83.33% {
        border-left-color: rgba(255, 100, 255, 0.2);
        border-top-color: rgba(255, 100, 255, 0.2);
    }
    100% {
        border-left-color: rgba(255, 100, 100, 0.2);
        border-top-color: rgba(255, 100, 100, 0.2);
    }
}

.fnote-card.has-music:hover .fnote-content {
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.fnote-card.has-music .fnote-content::before {
    background: rgba(0, 0, 0, 0.2);
    animation: music-content-before-cycle 6s ease-in-out infinite;
}

@keyframes music-content-before-cycle {
    0% { border-top-color: rgba(255, 100, 100, 0.2); }
    16.67% { border-top-color: rgba(255, 200, 100, 0.2); }
    33.33% { border-top-color: rgba(100, 255, 100, 0.2); }
    50% { border-top-color: rgba(100, 255, 255, 0.2); }
    66.67% { border-top-color: rgba(100, 100, 255, 0.2); }
    83.33% { border-top-color: rgba(255, 100, 255, 0.2); }
    100% { border-top-color: rgba(255, 100, 100, 0.2); }
}

.fnote-card.has-music:hover .fnote-content::before {
    background: rgba(0, 0, 0, 0.3);
}

/* Name styling for music cards */
.fnote-card.has-music .fnote-name {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Username styling for music cards */
.fnote-card.has-music .fnote-username {
    color: rgba(255, 255, 255, 0.7);
}

/* Timestamp styling for music cards */
.fnote-card.has-music .fnote-timestamp {
    color: rgba(255, 255, 255, 0.6);
}

.fnote-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.fnote-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid rgba(150, 150, 150, 0.8);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    background-color: rgba(100, 100, 100, 0.1);
}

.fnote-card.my-note .fnote-avatar {
    border: 3px solid var(--theme-color);
    box-shadow: 0 0 20px rgba(var(--rgb-theme-color), 0.5);
}

.fnote-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    }

.fnote-card:hover .fnote-avatar img {
   transform: scale(1.1);
}

.fnote-info {
   flex-grow: 1;
   min-width: 0;
}

.fnote-name {
   font-weight: bold;
   font-size: 1.1rem;
   margin-bottom: 0.25rem;
   word-wrap: break-word;
   color: var(--theme-color);
}

.fnote-card.my-note .fnote-name {
   color: var(--theme-color);
   text-shadow: 0 0 8px rgba(var(--rgb-theme-color), 0.4);
}

.fnote-username {
   font-size: 0.9rem;
   opacity: 0.7;
   word-wrap: break-word;
   color: var(--theme-color);
}

.fnote-content {
   position: relative;
   flex: 1;
   padding: 1rem 1.2rem;
   background: rgba(100, 100, 100, 0.08);
   border-radius: 14px;
   margin-top: 0.8rem;
   word-wrap: break-word;
   line-height: 1.5;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
   border-top-left-radius: 0;
   border-left: 1px solid rgba(150, 150, 150, 0.3);
   border-top: 1px solid rgba(150, 150, 150, 0.3);
   font-size: 1.05rem;
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   color: var(--theme-color);
   line-clamp: 4;
   box-orient: vertical;
   -moz-line-clamp: 4;
   -moz-box-orient: vertical;
   transition: all 0.3s ease;
}

.fnote-content a {
   word-break: break-all;
   color: var(--theme-color);
   text-decoration: underline;
}

.fnote-card:hover .fnote-content {
   background: rgba(120, 120, 120, 0.12);
   box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
}

.fnote-card.my-note .fnote-content {
   background: rgba(var(--rgb-theme-color), 0.1);
   border-left: 1px solid rgba(var(--rgb-theme-color), 0.4);
   border-top: 1px solid rgba(var(--rgb-theme-color), 0.4);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 8px rgba(var(--rgb-theme-color), 0.1);
}

.fnote-content::before {
   content: '';
   position: absolute;
   top: 0;
   left: -12px;
   width: 12px;
   height: 18px;
   background: rgba(100, 100, 100, 0.08);
   border-top-left-radius: 12px;
   clip-path: polygon(100% 0, 100% 100%, 0 0);
   border-top: 1px solid rgba(150, 150, 150, 0.3);
   transition: background 0.3s ease;
}

.fnote-card:hover .fnote-content::before {
   background: rgba(120, 120, 120, 0.12);
}

.fnote-card.my-note .fnote-content::before {
   background: rgba(var(--rgb-theme-color), 0.1);
   border-top: 1px solid rgba(var(--rgb-theme-color), 0.4);
}

.fnote-timestamp {
   font-size: 0.8rem;
   margin-top: 0.8rem;
   text-align: right;
   opacity: 0.7;
   font-style: italic;
   transition: opacity 0.3s ease;
   color: var(--theme-color);
}

.fnote-card:hover .fnote-timestamp {
   opacity: 1;
}

/* Enhanced Empty State */
.fnotes-empty-message {
   width: 100%;
   text-align: center;
   padding: 3rem 2rem;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   color: var(--theme-color);
   background: rgba(0, 0, 0, 0.3);
   border-radius: 15px;
   border: 1px dashed rgba(var(--rgb-theme-color), 0.3);
}

.fnotes-empty-icon {
   font-size: 3.5rem;
   margin-bottom: 1.5rem;
   opacity: 0.8;
   animation: fnotes-float 3s ease-in-out infinite;
}

.fnotes-empty-message p {
   font-size: 1.2rem;
   margin: 0.5rem 0;
   color: var(--theme-color);
}

.fnotes-empty-subtitle {
   font-size: 0.9rem !important;
   opacity: 0.7;
}

@keyframes fnotes-float {
   0% { transform: translateY(0px); }
   50% { transform: translateY(-10px); }
   100% { transform: translateY(0px); }
}

/* Hover glow effect for regular cards */
.fnote-card:hover {
   animation: fnote-card-glow 2s infinite alternate;
}

@keyframes fnote-card-glow {
   from { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 100, 100, 0.4); }
   to { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(120, 120, 120, 0.6); }
}

/* Music Button Styling */
.music-toggle-btn {
   background: transparent;
   border: 1px solid rgba(var(--rgb-theme-color), 0.3);
   color: var(--theme-color);
   padding: 0.6rem;
   border-radius: 8px;
   cursor: pointer;
   font-size: 0.85rem;
   transition: all 0.3s ease;
   box-shadow: 0 0 5px rgba(var(--rgb-theme-color), 0.1);
}

.music-toggle-btn:hover {
   background: rgba(var(--rgb-theme-color), 0.1);
   border-color: rgba(var(--rgb-theme-color), 0.5);
   box-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.3);
   transform: translateY(-1px);
}

/* Music Search Results Styling */
.music-search-result {
   display: flex;
   align-items: center;
   gap: 0.8rem;
   padding: 0.8rem;
   cursor: pointer;
   transition: all 0.3s ease;
   border-bottom: 1px solid rgba(var(--rgb-theme-color), 0.1);
}

.music-search-result:last-child {
   border-bottom: none;
}

.music-search-result:hover {
   background: rgba(var(--rgb-theme-color), 0.1);
   transform: translateX(5px);
}

.music-search-result img {
   width: 60px;
   height: 45px;
   object-fit: cover;
   border-radius: 6px;
   border: 1px solid rgba(var(--rgb-theme-color), 0.3);
}

.music-search-result-title {
   font-size: 0.9rem;
   font-weight: 500;
   color: var(--theme-color);
   margin-bottom: 0.2rem;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.music-search-result-channel {
   font-size: 0.8rem;
   color: rgba(var(--rgb-theme-color), 0.7);
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

/* Music Status Styling */
.music-status-loading {
   background: rgba(255, 193, 7, 0.1);
   border: 1px solid rgba(255, 193, 7, 0.3);
   color: #ffc107;
}

.music-status-success {
   background: rgba(var(--rgb-theme-color), 0.1);
   border: 1px solid rgba(var(--rgb-theme-color), 0.3);
   color: var(--theme-color);
}

.music-status-error {
   background: rgba(220, 53, 69, 0.1);
   border: 1px solid rgba(220, 53, 69, 0.3);
   color: #dc3545;
}

/* Music Indicator for Friend Notes with RGB cycling */
.music-indicator {
   margin: 0.8rem 0 0.5rem 0;
   padding: 0.6rem 0.8rem;
   background: rgba(0, 0, 0, 0.3);
   border-radius: 8px;
   transition: all 0.3s ease;
   backdrop-filter: blur(2px);
   animation: music-indicator-bg-cycle 6s ease-in-out infinite;
}

@keyframes music-indicator-bg-cycle {
   0% {
       border: 1px solid rgba(255, 100, 100, 0.2);
       background: rgba(255, 100, 100, 0.04);
   }
   16.67% {
       border: 1px solid rgba(255, 200, 100, 0.2);
       background: rgba(255, 200, 100, 0.04);
   }
   33.33% {
       border: 1px solid rgba(100, 255, 100, 0.2);
       background: rgba(100, 255, 100, 0.04);
   }
   50% {
       border: 1px solid rgba(100, 255, 255, 0.2);
       background: rgba(100, 255, 255, 0.04);
   }
   66.67% {
       border: 1px solid rgba(100, 100, 255, 0.2);
       background: rgba(100, 100, 255, 0.04);
   }
   83.33% {
       border: 1px solid rgba(255, 100, 255, 0.2);
       background: rgba(255, 100, 255, 0.04);
   }
   100% {
       border: 1px solid rgba(255, 100, 100, 0.2);
       background: rgba(255, 100, 100, 0.04);
   }
}

.fnote-card.has-music:hover .music-indicator {
   transform: translateY(-1px);
   backdrop-filter: blur(4px);
}

.music-indicator-info {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   margin-bottom: 0.5rem;
}

.music-indicator-name {
   flex: 1;
   font-size: 0.85rem;
   color: rgba(255, 255, 255, 0.95);
   font-weight: 500;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.music-indicator-duration {
   font-size: 0.75rem;
   color: rgba(255, 255, 255, 0.8);
   font-weight: 500;
   background: rgba(0, 0, 0, 0.4);
   padding: 2px 6px;
   border-radius: 4px;
   border: 1px solid rgba(255, 255, 255, 0.1);
   animation: music-duration-cycle 6s ease-in-out infinite;
}

@keyframes music-duration-cycle {
   0% { border-color: rgba(255, 100, 100, 0.3); }
   16.67% { border-color: rgba(255, 200, 100, 0.3); }
   33.33% { border-color: rgba(100, 255, 100, 0.3); }
   50% { border-color: rgba(100, 255, 255, 0.3); }
   66.67% { border-color: rgba(100, 100, 255, 0.3); }
   83.33% { border-color: rgba(255, 100, 255, 0.3); }
   100% { border-color: rgba(255, 100, 100, 0.3); }
}

.music-waveform-mini {
   height: 20px;
   background: rgba(0, 0, 0, 0.5);
   border-radius: 4px;
   overflow: hidden;
   cursor: pointer;
   transition: all 0.3s ease;
   position: relative;
   animation: music-waveform-cycle 6s ease-in-out infinite;
}

@keyframes music-waveform-cycle {
   0% { border: 1px solid rgba(255, 100, 100, 0.2); }
   16.67% { border: 1px solid rgba(255, 200, 100, 0.2); }
   33.33% { border: 1px solid rgba(100, 255, 100, 0.2); }
   50% { border: 1px solid rgba(100, 255, 255, 0.2); }
   66.67% { border: 1px solid rgba(100, 100, 255, 0.2); }
   83.33% { border: 1px solid rgba(255, 100, 255, 0.2); }
   100% { border: 1px solid rgba(255, 100, 100, 0.2); }
}

.music-waveform-mini:hover {
   background: rgba(0, 0, 0, 0.7);
   transform: translateY(-1px);
}

.music-waveform-mini::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   opacity: 0;
   transition: opacity 0.3s ease;
   animation: music-waveform-bg-cycle 6s ease-in-out infinite;
}

@keyframes music-waveform-bg-cycle {
   0% {
       background: linear-gradient(90deg, 
                   rgba(255, 100, 100, 0.1), 
                   rgba(255, 150, 150, 0.05), 
                   rgba(255, 200, 200, 0.02));
   }
   16.67% {
       background: linear-gradient(90deg, 
                   rgba(255, 200, 100, 0.1), 
                   rgba(255, 220, 150, 0.05), 
                   rgba(255, 240, 200, 0.02));
   }
   33.33% {
       background: linear-gradient(90deg, 
                   rgba(100, 255, 100, 0.1), 
                   rgba(150, 255, 150, 0.05), 
                   rgba(200, 255, 200, 0.02));
   }
   50% {
       background: linear-gradient(90deg, 
                   rgba(100, 255, 255, 0.1), 
                   rgba(150, 255, 255, 0.05), 
                   rgba(200, 255, 255, 0.02));
   }
   66.67% {
       background: linear-gradient(90deg, 
                   rgba(100, 100, 255, 0.1), 
                   rgba(150, 150, 255, 0.05), 
                   rgba(200, 200, 255, 0.02));
   }
   83.33% {
       background: linear-gradient(90deg, 
                   rgba(255, 100, 255, 0.1), 
                   rgba(255, 150, 255, 0.05), 
                   rgba(255, 200, 255, 0.02));
   }
   100% {
       background: linear-gradient(90deg, 
                   rgba(255, 100, 100, 0.1), 
                   rgba(255, 150, 150, 0.05), 
                   rgba(255, 200, 200, 0.02));
   }
}

.music-waveform-mini:hover::before {
   opacity: 1;
}

/* Scrollbar Styling for Music Results */
#noteMusicResults::-webkit-scrollbar {
   width: 6px;
}

#noteMusicResults::-webkit-scrollbar-track {
   background: rgba(0, 0, 0, 0.4);
   border-radius: 3px;
}

#noteMusicResults::-webkit-scrollbar-thumb {
   background: rgba(var(--rgb-theme-color), 0.5);
   border-radius: 3px;
}

/* Volume Slider Styling */
#visualizerVolumeSlider::-webkit-slider-thumb {
   appearance: none;
   width: 14px;
   height: 14px;
   background: var(--theme-color);
   border-radius: 50%;
   cursor: pointer;
   box-shadow: 0 0 6px rgba(var(--rgb-theme-color), 0.5);
}

#visualizerVolumeSlider::-moz-range-thumb {
   width: 14px;
   height: 14px;
   background: var(--theme-color);
   border-radius: 50%;
   cursor: pointer;
   border: none;
   box-shadow: 0 0 6px rgba(var(--rgb-theme-color), 0.5);
}

/* Animation for loading icons */
@keyframes spin {
   from { transform: rotate(0deg); }
   to { transform: rotate(360deg); }
}

.spinning {
   animation: spin 1s linear infinite;
}

/* Hidden class utility */
.hidden {
   display: none !important;
}

/* Responsive adjustments for music elements */
@media (max-width: 768px) {
   #noteMusicSection {
       padding: 0.6rem !important;
   }
   
   .music-search-result {
       padding: 0.6rem;
       gap: 0.6rem;
   }
   
   .music-search-result img {
       width: 50px;
       height: 38px;
   }
   
   .fnote-card {
       max-height: 320px;
   }
   
   .fnote-card.has-music .music-corner-indicator {
       width: 20px;
       height: 20px;
       font-size: 10px;
       top: 8px;
       right: 8px;
   }
}

@media (max-width: 480px) {
   #noteMusicVisualizerModal > div {
       width: 98vw !important;
       height: 90vh !important;
       margin: 5vh auto !important;
       border-radius: 10px !important;
   }
   
   #noteMusicVisualizerModal .visualizer-controls {
       flex-direction: column !important;
       gap: 1rem !important;
       padding: 1rem !important;
   }
   
   .fnote-card.has-music {
       min-width: 280px;
       padding: 1.2rem;
   }
   
   .fnote-card.has-music .music-corner-indicator {
       width: 18px;
       height: 18px;
       font-size: 9px;
       top: 6px;
       right: 6px;
   }
}