/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #070814;
    --card-bg: rgba(18, 20, 42, 0.65);
    --primary: #9333ea;       /* Neon Lila / Violet */
    --secondary: #00d2ff;     /* Electric Blue */
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #7e22ce 50%, #c084fc 100%);
    --blue-gradient: linear-gradient(135deg, #00d2ff, #2563eb);
    --purple-gradient: linear-gradient(135deg, #c084fc, #7e22ce);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --card-border: rgba(147, 51, 234, 0.25);
    --card-border-hover: rgba(0, 210, 255, 0.45);
    --success: #10b981;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(0, 210, 255, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(147, 51, 234, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(126, 34, 206, 0.08) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 0, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 242, 234, 0.5); }
    100% { box-shadow: 0 0 5px rgba(255, 0, 80, 0.5); }
}

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

/* Layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards (Glassmorphism & Neon Glow) */
.card {
    background: linear-gradient(145deg, rgba(20, 24, 48, 0.75), rgba(12, 14, 28, 0.85));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out forwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 15px 50px 0 rgba(0, 210, 255, 0.15), 0 0 30px 0 rgba(147, 51, 234, 0.2);
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-light);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.5s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Navigation Menu Tabs (Pill Style) */
.nav-menu {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    background: rgba(10, 12, 26, 0.7);
    backdrop-filter: blur(15px);
    padding: 0.5rem;
    border-radius: 60px;
    border: 1px solid var(--card-border);
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-tab.active {
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.4), 0 0 35px rgba(147, 51, 234, 0.3);
}

/* Tab Panels */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Gift Manager Grid Layout */
.gift-manager-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .gift-manager-grid {
        grid-template-columns: 1fr;
    }
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.section-desc code {
    background: rgba(0, 242, 234, 0.1);
    color: var(--secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

.obs-instructions-box {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
}

.obs-instructions-box h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--secondary);
}

.obs-instructions-box ol {
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 0, 80, 0.5));
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient 3s linear infinite;
    text-shadow: 0 2px 10px rgba(255, 0, 80, 0.2);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Connection Panel */
#connection-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.connection-controls {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.disconnected {
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.dot.connected {
    background-color: var(--success);
    animation: pulse 2s infinite;
}

.viewer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Inputs & Buttons */
.input-field {
    background: rgba(10, 12, 28, 0.7);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.input-field:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
    background: rgba(15, 18, 40, 0.9);
}

.btn {
    padding: 0.8rem 1.75rem;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--blue-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.5);
    background: var(--accent-gradient);
}

.btn-secondary {
    background: var(--purple-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-light);
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 210, 255, 0.1);
}

.btn-small {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    border-radius: 30px;
}

.btn-success {
    background: var(--success);
    color: #000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Statistics */
.statistics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(0, 210, 255, 0.25);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.2);
}

.stat-details h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
}

/* Event Feed */
.event-feed-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.event-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.event-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    border-left: 4px solid transparent;
    transition: background 0.2s ease;
}

.event-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.event-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    min-width: 65px;
    padding-top: 0.1rem;
}

.event-content {
    flex: 1;
    word-break: break-word;
}

.event-username {
    font-weight: 600;
    color: var(--text-light);
}

/* Event Types Colors */
.event-item.type-gift {
    border-left-color: #ffd700;
}
.event-item.type-chat {
    border-left-color: #ffffff;
}
.event-item.type-like {
    border-left-color: var(--primary);
}
.event-item.type-follow {
    border-left-color: var(--success);
}

/* Configuration */
.configuration-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.gift-form {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.gift-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.gift-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.gift-list-header h3 {
    font-size: 1rem;
    color: var(--text-light);
}

.gift-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gift-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gift-item:hover {
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.gift-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gift-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.gift-item-name {
    font-weight: 600;
    color: var(--secondary);
}

.gift-item-details {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gift-item-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-small {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit {
    background: rgba(0, 242, 234, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(0, 242, 234, 0.3);
}

.btn-edit:hover {
    background: var(--secondary);
    color: #000;
}

.btn-delete {
    background: rgba(255, 0, 80, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 0, 80, 0.3);
}

.btn-delete:hover {
    background: var(--primary);
    color: #fff;
}

/* Upload Field Styling */
.upload-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.upload-field-row .input-field {
    flex: 1;
}

.btn-file-upload {
    background: rgba(0, 242, 234, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(0, 242, 234, 0.4);
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-file-upload:hover {
    background: var(--secondary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.4);
}

.btn-sound-upload {
    background: rgba(255, 0, 80, 0.15);
    color: var(--primary);
    border-color: rgba(255, 0, 80, 0.4);
}

.btn-sound-upload:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 80, 0.4);
}

.upload-status {
    font-size: 0.8rem;
    margin-top: 4px;
    color: var(--success);
    display: block;
}
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: var(--primary);
    color: white;
}

/* Overlay URL */
.instructions {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.url-container {
    display: flex;
    gap: 1rem;
}

.url-input {
    flex: 1;
    color: var(--secondary);
    font-family: monospace;
    font-size: 1rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .event-feed-container, .configuration-container {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .connection-controls {
        flex-direction: column;
        min-width: 100%;
    }
    
    .url-container {
        flex-direction: column;
    }
}

/* API Key Hint */
.api-key-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--secondary);
}

.api-key-hint a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.api-key-hint a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Leaderboard Styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 140, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.4);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(255, 255, 255, 0.05));
    border-color: rgba(192, 192, 192, 0.4);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(255, 140, 0, 0.05));
    border-color: rgba(205, 127, 50, 0.4);
}

.lb-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.rank-1 .lb-badge {
    background: #ffd700;
    color: #000;
    font-size: 1.1rem;
}

.rank-2 .lb-badge {
    background: #c0c0c0;
    color: #000;
    font-size: 1.1rem;
}

.rank-3 .lb-badge {
    background: #cd7f32;
    color: #fff;
    font-size: 1.1rem;
}

.lb-pfp {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.lb-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
}

.lb-score {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary);
}

/* Quick Presets & Gift Selection */
.preset-container {
    margin-top: 0.6rem;
}
.preset-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}
.preset-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.preset-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.preset-pill:hover {
    background: var(--primary);
    border-color: var(--secondary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}
.gift-pick-chip {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.1), rgba(147, 51, 234, 0.15));
    border: 1px solid rgba(0, 210, 255, 0.3);
}
.gift-pick-chip:hover {
    background: var(--blue-gradient);
    border-color: var(--secondary);
    color: #ffffff;
}

/* ========================================================
   BUILT-IN GIF & ANIMATION GALLERY MODAL STYLES
   ======================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-card {
    background: linear-gradient(135deg, rgba(26, 32, 53, 0.95), rgba(18, 22, 38, 0.98));
    border: 1px solid rgba(0, 242, 234, 0.25);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 242, 234, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 860px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 30%, #00f2ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: rotate(90deg);
}

.gallery-category-tabs {
    display: flex;
    gap: 8px;
    padding: 1rem 1.75rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.gallery-tab {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.gallery-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.gallery-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.3);
}

.gallery-grid {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 14px;
    flex: 1;
}

.gallery-item-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gallery-item-card:hover {
    transform: translateY(-4px);
    background: rgba(0, 242, 234, 0.08);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 242, 234, 0.25);
}

.gallery-item-img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-select-btn {
    width: 100%;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(0, 242, 234, 0.3);
    background: rgba(0, 242, 234, 0.15);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-item-card:hover .gallery-item-select-btn {
    background: var(--primary);
    color: #090e17;
    box-shadow: 0 4px 12px rgba(0, 242, 234, 0.4);
}

/* 9-Position Profile Badge Selector Grid */
.position-grid-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 420px;
    margin: 8px 0;
}

.pos-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 4px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
}

.pos-btn:hover {
    background: rgba(0, 242, 234, 0.15);
    border-color: rgba(0, 242, 234, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.pos-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.3), rgba(147, 51, 234, 0.35));
    border-color: #00f2ea;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(0, 242, 234, 0.4);
}

/* Sound Library Cards */
.sound-item-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.sound-item-card:hover {
    transform: translateY(-3px);
    background: rgba(16, 185, 129, 0.08);
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.sound-item-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.4));
}

.sound-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
    width: 100%;
}

.sound-item-btn-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.sound-btn-play {
    flex: 1;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-btn-play:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.sound-btn-select {
    flex: 1.4;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-item-card:hover .sound-btn-select {
    background: #10b981;
    color: #090e17;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
