/* ===== CLAUDE DESIGN SYSTEM ===== */

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

:root {
    /* Claude Accent Colors */
    --accent: #C46849;
    --accent-hover: #D4785A;
    --accent-active: #B45839;
    --accent-muted: rgba(196, 104, 73, 0.15);

    /* Background Colors (preserved) */
    --bg-base: #15140c;
    --bg-elevated: #1c1b12;
    --bg-card: #1c1b12;
    --bg-highlight: #2a2819;
    --bg-press: #3a3828;

    /* Text Colors */
    --text-base: #ffffff;
    --text-subdued: #b3b3b3;
    --text-muted: #6a6a6a;

    /* Border Colors */
    --border-subtle: #282828;
    --border: #535353;

    /* Status Colors */
    --error: #e84a4d;
    --error-bg: rgba(232, 74, 77, 0.1);
    --success: #4CAF50;
    --success-bg: rgba(76, 175, 80, 0.1);

    /* Claude Design Tokens */
    --transition-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-duration: 200ms;
    --transition-duration-slow: 300ms;

    /* Border Radius Scale */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadow System */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-base);
    min-height: 100vh;
    color: var(--text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1024px;
    margin: 0 auto;
}

/* ===== PAGE TITLES ===== */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-base);
    margin: 0 0 20px 0;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-subdued);
    margin: -12px 0 24px 0;
}

/* ===== HEADER / NAVIGATION ===== */
.app-header {
    background: var(--bg-base);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-duration) var(--transition-ease);
}

.nav-link:hover {
    color: var(--text-base);
    text-decoration: none;
}

.nav-link.active {
    color: var(--text-base);
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 8px;
    transition: color var(--transition-duration) var(--transition-ease);
}

.hamburger-btn:hover {
    color: var(--text-base);
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 69px;
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: 16px 24px;
        gap: 16px;
        display: none;
        z-index: 99;
    }

    .main-nav.open {
        display: flex;
    }

    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.app-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin: 0;
}

.header-logo {
    height: 36px;
    width: auto;
}

.hero-logo {
    max-width: 400px;
    width: 80%;
    height: auto;
    margin-bottom: 24px;
}

/* Profile Button & Dropdown */
.profile-button {
    background: #0a0a0a;
    border: none;
    color: var(--text-base);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-duration) var(--transition-ease);
    width: 32px;
    height: 32px;
}

.profile-button:hover {
    background: var(--bg-highlight);
    box-shadow: var(--shadow-sm);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-highlight);
    border-radius: 4px;
    padding: 4px;
    min-width: 196px;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.3), 0 6px 8px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-base);
    margin-bottom: 2px;
}

.profile-collection-count {
    font-size: 0.75rem;
    color: var(--text-subdued);
    font-weight: 400;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-subdued);
    font-size: 0.875rem;
    font-weight: 400;
    width: 100%;
    text-align: left;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-ease);
    text-decoration: none;
}

a.profile-dropdown-item,
a.profile-dropdown-item:visited {
    color: var(--text-subdued);
}

.profile-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-base);
}

.profile-dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* ===== SCREEN LAYOUTS ===== */
.screen {
    animation: fadeIn 0.3s ease;
    padding: 24px 32px;
}

.hidden {
    display: none !important;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    transition: background var(--transition-duration) var(--transition-ease);
}

.card:hover {
    background: var(--bg-highlight);
}

.card h2 {
    margin-bottom: 20px;
    color: var(--text-base);
    font-size: 1.5rem;
    font-weight: 700;
}

.card h3 {
    margin-bottom: 16px;
    color: var(--text-base);
    font-size: 1rem;
    font-weight: 600;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-base);
    font-size: 0.875rem;
    letter-spacing: 0.1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.875rem;
    background: var(--bg-elevated);
    color: var(--text-base);
    transition: all var(--transition-duration) var(--transition-ease);
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-subdued);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-highlight);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-subdued);
    margin-top: 8px;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--text-base);
}

.eye-icon,
.eye-off-icon {
    width: 20px;
    height: 20px;
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-ease);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    background: var(--accent-active);
}

.btn-primary:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-primary.big,
.btn-large {
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: var(--radius-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-subdued);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-base);
    color: var(--text-base);
    background: rgba(255, 255, 255, 0.05);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.08);
}

.btn-danger {
    background: var(--error);
    color: var(--text-base);
}

.btn-danger:hover {
    background: #f05a5d;
    box-shadow: var(--shadow-md);
}

.btn-danger:active {
    background: #d04448;
}

.btn-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-subdued);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-duration) var(--transition-ease);
}

.btn-back:hover {
    border-color: var(--text-base);
    color: var(--text-base);
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: fadeIn var(--transition-duration) var(--transition-ease);
}

.modal-card {
    background: var(--bg-highlight);
    border-radius: var(--radius-xl);
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp var(--transition-duration-slow) var(--transition-ease);
    border: 1px solid var(--border-subtle);
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-base);
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-message {
    color: var(--text-base);
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.modal-submessage {
    color: var(--text-subdued);
    font-size: 0.75rem;
    margin-top: 8px;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(29, 185, 84, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-bar-container {
    background: var(--bg-elevated);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    height: 100%;
    width: 0%;
    transition: width var(--transition-duration-slow) var(--transition-ease);
    border-radius: var(--radius-sm);
}

/* ===== SETTINGS PAGE ===== */
.settings-container {
    max-width: 1024px;
    margin: 0 auto;
}

.settings-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.settings-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.settings-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 32px;
    overflow-x: auto;
}

.settings-tab {
    background: transparent;
    border: none;
    color: var(--text-subdued);
    padding: 12px 24px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-duration) var(--transition-ease);
    white-space: nowrap;
}

.settings-tab:hover {
    color: var(--text-base);
}

.settings-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.settings-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-tab-content.active {
    display: block;
}

.settings-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-base);
    text-transform: none;
    letter-spacing: normal;
}

.settings-description {
    font-size: 0.875rem;
    color: var(--text-subdued);
    margin-bottom: 24px;
    line-height: 1.5;
}

.settings-description.danger {
    color: var(--error);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Connection Status */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
}

.connection-status.connected {
    background: var(--success-bg);
    color: var(--success);
}

.connection-status.disconnected {
    background: var(--error-bg);
    color: var(--error);
}

/* ===== ADMIN PANEL ===== */
.admin-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 24px 32px;
}

.admin-header {
    text-align: center;
    margin-bottom: 48px;
}

.admin-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header p {
    font-size: 1.125rem;
    color: var(--text-subdued);
}

.user-selector {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 8px;
}

.user-selector label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-base);
}

.user-selector select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-ease);
}

.user-selector select:hover {
    border-color: var(--text-subdued);
}

.user-selector select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.training-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
}

.context-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-elevated);
    border-radius: 8px;
}

.context-item {
    text-align: center;
}

.context-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subdued);
    margin-bottom: 8px;
    font-weight: 600;
}

.context-item .context-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-base);
}

/* ===== HOME PAGE SELECTOR ===== */
.selector-container {
    max-width: 1024px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-header h2 {
    margin: 48px 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-subdued);
}

.collection-info {
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-info p {
    color: var(--text-subdued);
    font-size: 0.875rem;
    font-weight: 700;
}

.context-display {
    margin-bottom: 32px;
}

.context-narrative {
    margin-bottom: 24px;
    text-align: center;
}

.context-narrative p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-subdued);
    margin-bottom: 16px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.option-btn {
    padding: 20px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    color: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-ease);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 100px;
    text-align: center;
}

.option-icon {
    font-size: 32px;
    line-height: 1;
}

.option-label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.option-btn:hover {
    border-color: var(--text-base);
    background: var(--bg-highlight);
    transform: translateY(-2px);
}

.option-btn.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #000000;
}

.option-btn.selected .option-icon {
    transform: scale(1.1);
}

.selection-explanation {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-subdued);
    margin: 24px 0;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.refresh-link {
    display: inline-block;
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all var(--transition-duration) var(--transition-ease);
}

.refresh-link:hover {
    color: var(--accent);
    background: var(--bg-elevated);
}

.actions {
    text-align: center;
    margin: 48px 0;
    display: flex;
    justify-content: center;
}

.actions .btn-secondary {
    margin: 0 auto;
}

.selection-hint {
    margin-top: 16px;
    color: var(--text-subdued);
    font-size: 0.875rem;
    font-style: italic;
}

.start-over-container {
    text-align: center;
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--border-subtle);
}

.start-over-link {
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color var(--transition-duration) var(--transition-ease);
}

.start-over-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ===== RESULTS / RECORD CARDS ===== */
.results {
    max-width: 1024px;
    margin: 0 auto;
    animation: slideUp 0.3s ease;
}

.results h2,
.suggestion-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-base);
    text-align: center;
}

#suggestedRecords {
    margin-bottom: 32px;
}

.record-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all var(--transition-duration) var(--transition-ease);
    cursor: pointer;
}

.record-card:hover {
    background: var(--bg-highlight);
    box-shadow: var(--shadow-md);
}

.record-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
    background: var(--bg-highlight);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.record-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-base);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
}

.record-card .artist {
    color: var(--text-subdued);
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-card .year {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

.record-card .genres {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genre-tag {
    background: var(--bg-highlight);
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 0.625rem;
    color: var(--text-subdued);
    font-weight: 600;
}

.record-card .match-reason {
    margin-top: 12px;
    padding: 12px;
    background: var(--success-bg);
    border-left: 2px solid var(--accent);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
}

/* Single record card with detailed explanation */
.record-card-single {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.record-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    padding: 32px;
    background: linear-gradient(135deg, #1e1e1e 0%, var(--bg-elevated) 100%);
}

.record-cover-large {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.record-info h3 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-base);
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.record-info .artist {
    font-size: 1.25rem;
    color: var(--text-subdued);
    margin-bottom: 8px;
    font-weight: 600;
}

.record-info .year {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.record-info .genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.lastfm-indicator,
.spotify-indicator {
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.lastfm-indicator {
    background: var(--success-bg);
    color: var(--accent);
}

.spotify-indicator {
    background: rgba(30, 215, 96, 0.15);
    color: #1ed760;
}

.spotify-features {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--text-subdued);
    font-family: 'Courier New', monospace;
}

.recommendation-explanation {
    padding: 32px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
}

.explanation-narrative {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-base);
    margin: 0;
}

.recommendation-explanation h4 {
    font-size: 1.125rem;
    color: var(--text-base);
    margin-bottom: 20px;
    font-weight: 600;
}

.explanation-item {
    background: var(--bg-highlight);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent);
}

.explanation-item:last-child {
    margin-bottom: 0;
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.explanation-icon {
    font-size: 1.25rem;
}

.explanation-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

.explanation-text {
    font-size: 0.9375rem;
    color: var(--text-base);
    line-height: 1.6;
    padding-left: 35px;
}

/* ===== RATING BUTTONS (THUMBS UP/DOWN) ===== */
.rating-buttons {
    padding: 32px;
    background: var(--bg-base);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.rating-prompt {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-base);
    margin-bottom: 20px;
}

.rating-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.rating-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-ease);
    font-size: 0.875rem;
    font-weight: 600;
}

.rating-btn:hover {
    border-color: var(--text-base);
    background: var(--bg-highlight);
    box-shadow: var(--shadow-md);
}

.rating-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.rating-btn-up:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.rating-btn-up.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #000000;
}

.rating-btn-down:hover {
    border-color: var(--error);
    color: var(--error);
}

.rating-btn-down.selected {
    border-color: var(--error);
    background: var(--error);
    color: var(--text-base);
}

/* Rating feedback notification */
.rating-feedback-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    flex-shrink: 0;
}

.notification-content {
    text-align: left;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-base);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.75rem;
    color: var(--text-subdued);
    margin: 0;
}

/* ===== FEEDBACK MESSAGES ===== */
.error,
.error-message {
    background: var(--error-bg);
    color: var(--error);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid rgba(232, 74, 77, 0.3);
    font-size: 0.875rem;
}

.success {
    background: var(--success-bg);
    color: var(--success);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid rgba(29, 185, 84, 0.3);
    font-size: 0.875rem;
}

.loading,
.loading-state {
    text-align: center;
    padding: 24px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.875rem;
}

.loading-text {
    color: var(--text-subdued);
    margin-top: 16px;
}

/* ===== AUTH SCREENS ===== */
.auth-container,
.setup-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

/* Auth screen with header */
.auth-screen-wrapper {
    min-height: calc(100vh - 65px); /* Account for header height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-content {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.3s ease;
}

.auth-card,
.setup-card {
    width: 100%;
    max-width: 450px;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 48px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-toggle {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-subdued);
}

.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.feature-card {
    padding: 24px;
    border-radius: 8px;
    background: var(--bg-elevated);
}

.feature-icon,
.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--accent);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-base);
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-subdued);
    line-height: 1.5;
}

/* ===== UTILITY ===== */
ol {
    margin: 20px 0;
    padding-left: 20px;
    color: var(--text-subdued);
}

ol li {
    margin: 12px 0;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-duration) var(--transition-ease);
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

code {
    background: var(--bg-highlight);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-highlight);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-press);
}

/* ===== ADMIN PANEL SPECIFIC STYLES ===== */
.user-selector {
    margin-bottom: 24px;
}

.user-selector select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--bg-elevated);
    color: var(--text-base);
    transition: all var(--transition-duration) var(--transition-ease);
    font-family: inherit;
}

.record-display {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-elevated);
    border-radius: 8px;
}

.record-cover {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.record-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.star-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.star {
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.star:hover,
.star.active {
    transform: scale(1.15);
}

.star.filled {
    color: #ffd700;
}

.star.empty {
    color: var(--border);
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-base);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-subdued);
}

/* Analytics Cards */
.analytics-stat-card {
    text-align: center;
    padding: 24px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    transition: all var(--transition-duration) var(--transition-ease);
}

.analytics-stat-card:hover {
    background: var(--bg-highlight);
    box-shadow: var(--shadow-md);
}

.analytics-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.analytics-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-base);
}

.analytics-label {
    font-size: 0.875rem;
    color: var(--text-subdued);
    font-weight: 600;
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead tr {
    border-bottom: 1px solid var(--border-subtle);
}

.admin-table th {
    text-align: left;
    padding: 12px;
    color: var(--text-subdued);
    font-weight: 600;
    font-size: 0.875rem;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-duration) var(--transition-ease);
}

.admin-table tbody tr:hover {
    background: var(--bg-highlight);
}

.admin-table td {
    padding: 12px;
    color: var(--text-base);
}

/* Invite Codes */
.invite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.invite-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.btn-text-link:hover {
    text-decoration: underline;
}

.invite-table-wrapper {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
}

.invite-table {
    width: 100%;
    border-collapse: collapse;
}

.invite-table thead tr {
    border-bottom: 1px solid var(--border-subtle);
}

.invite-table th {
    text-align: left;
    padding: 12px;
    color: var(--text-subdued);
    font-weight: 600;
}

.invite-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
}

.invite-table td {
    padding: 12px;
    color: var(--text-base);
}

/* Training Select */
.training-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-base);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-ease);
    font-family: inherit;
}

.training-select:hover {
    border-color: var(--text-subdued);
}

.training-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
    border-color: var(--text-base);
}

/* Location Notice */
.location-notice {
    max-width: 1024px;
    margin: 0 auto 24px;
    animation: slideDown 0.3s ease;
}

.location-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    position: relative;
}

.location-notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.location-notice-title {
    font-weight: 700;
    color: var(--text-base);
    margin-bottom: 4px;
    font-size: 0.9375rem;
}

.location-notice-text {
    color: var(--text-subdued);
    font-size: 0.875rem;
    line-height: 1.5;
}

.location-notice-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-subdued);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color var(--transition-duration) var(--transition-ease);
}

.location-notice-dismiss:hover {
    color: var(--text-base);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-header {
        padding: 16px 24px;
    }

    .app-logo {
        font-size: 1.25rem;
    }

    .screen {
        padding: 24px 16px;
    }

    .gradient-text {
        font-size: 2rem;
    }

    .option-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .option-btn {
        min-height: 90px;
        padding: 16px 12px;
    }

    .option-icon {
        font-size: 28px;
    }

    .option-label {
        font-size: 0.8125rem;
    }

    .collection-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 8px;
    }

    .record-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .record-cover-large {
        max-width: 250px;
        margin: 0 auto;
    }

    .record-info h3 {
        font-size: 1.5rem;
    }

    .record-info .artist {
        font-size: 1rem;
    }

    .recommendation-explanation {
        padding: 20px;
    }

    .explanation-text {
        padding-left: 0;
        font-size: 0.875rem;
    }

    .settings-header h2 {
        font-size: 2rem;
    }

    .settings-tabs {
        overflow-x: auto;
    }

    .admin-header h1 {
        font-size: 2rem;
    }

    .auth-card,
    .setup-card {
        padding: 32px 24px;
    }
}

/* ===== LANDING PAGE ===== */
.landing-header {
    background: var(--bg-base);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

.hero-section {
    text-align: center;
    margin-bottom: 64px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-base) 0%, var(--text-subdued) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-subdued);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 64px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    transition: all var(--transition-duration) var(--transition-ease);
}

.feature-card:hover {
    background: var(--bg-highlight);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    text-align: center;
    width: 100%;
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-base);
}

.feature-card p {
    color: var(--text-subdued);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.how-it-works-section {
    margin-bottom: 80px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-base);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto 24px;
    color: var(--bg-base);
}

.step-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-base);
}

.step-card p {
    color: var(--text-subdued);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.landing-footer {
    text-align: center;
    padding: 32px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-subdued);
    font-size: 0.875rem;
}

/* Landing Page Responsive */
@media (max-width: 768px) {
    .landing-header .header-right {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .landing-container {
        padding: 32px 24px;
    }

    .hero-section {
        margin-bottom: 48px;
    }

    .features-section,
    .how-it-works-section {
        margin-bottom: 48px;
    }

    /* Invite Codes mobile */
    .invite-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }

    .invite-table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .settings-card {
        padding: 16px;
    }

    /* Admin tabs mobile - horizontal scroll */
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Setup Divider */
.setup-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.setup-divider::before,
.setup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

/* ===== COLLECTION PAGE ===== */

.collection-page {
    max-width: 1024px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Progress Bar */
.collection-connect-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-highlight);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 16px;
}

.collection-connect-banner p {
    color: var(--text-subdued);
    font-size: 14px;
    margin: 0;
}

.collection-connect-banner .btn-primary {
    white-space: nowrap;
    flex-shrink: 0;
}

.connect-discogs-link {
    display: none;
}

.collection-progress-section {
    margin-bottom: 24px;
}

.collection-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-highlight);
    border-radius: 4px;
    overflow: hidden;
}

.collection-progress-fill {
    height: 100%;
    background: var(--text-subdued);
    border-radius: var(--radius-sm);
    transition: width var(--transition-duration-slow) var(--transition-ease);
}

.collection-progress-fill.ready {
    background: var(--accent);
}

.collection-progress-text {
    color: var(--text-subdued);
    font-size: 13px;
    margin-top: 8px;
}

/* Toolbar */
.collection-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.collection-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.collection-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.collection-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.collection-search-input {
    width: 100%;
    padding: 10px 36px 10px 40px;
    background: var(--bg-highlight);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-base);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.collection-search-input:focus {
    border-color: var(--text-subdued);
}

.collection-search-input::placeholder {
    color: var(--text-muted);
}

.collection-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}

.collection-search-clear:hover {
    color: var(--text-base);
}

.btn-icon-action {
    background: var(--bg-highlight);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-subdued);
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-icon-action:hover {
    background: var(--bg-press);
    color: var(--text-base);
}

.collection-view-toggle {
    display: flex;
    gap: 4px;
}

.view-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    background: var(--bg-highlight);
    color: var(--text-base);
    border-color: var(--text-subdued);
}

/* Scanner */
.scanner-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.scanner-header h3 {
    font-size: 16px;
    color: var(--text-base);
}

.scanner-hint {
    color: var(--text-subdued);
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

.scanner-error {
    color: var(--error);
    text-align: center;
    padding: 24px;
}

#scannerView {
    border-radius: 8px;
    overflow: hidden;
}

/* Search Results */
.search-results {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    max-height: 500px;
    overflow-y: auto;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.search-results-header h3 {
    font-size: 16px;
    color: var(--text-base);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
}

.btn-text:hover {
    color: var(--text-base);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-cover {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-artist {
    font-size: 13px;
    color: var(--text-subdued);
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.search-no-results {
    color: var(--text-subdued);
    text-align: center;
    padding: 24px;
}

.btn-add {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-duration) var(--transition-ease);
}

.btn-add:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-sm);
}

.btn-add.added {
    background: var(--bg-highlight);
    color: var(--text-subdued);
    cursor: default;
    transform: none;
}

.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.search-pagination span {
    color: var(--text-subdued);
    font-size: 13px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.collection-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.collection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.collection-card-cover {
    position: relative;
    aspect-ratio: 1;
}

.collection-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-card-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.collection-card:hover .collection-card-remove {
    opacity: 1;
}

.collection-card-info {
    padding: 10px;
}

.collection-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-card-artist {
    font-size: 12px;
    color: var(--text-subdued);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Collection List */
.collection-list {
    display: flex;
    flex-direction: column;
}

.collection-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.collection-list-cover {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.collection-list-info {
    flex: 1;
    min-width: 0;
}

.collection-list-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-list-artist {
    font-size: 13px;
    color: var(--text-subdued);
}

.collection-list-meta {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.collection-list-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.collection-list-remove:hover {
    color: var(--error);
    background: var(--error-bg);
}

/* Empty State */
.collection-empty {
    text-align: center;
    padding: 60px 20px;
}

.collection-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.collection-empty h3 {
    color: var(--text-base);
    font-size: 20px;
    margin-bottom: 8px;
}

.collection-empty p {
    color: var(--text-subdued);
    font-size: 14px;
}

/* CTA */
.collection-cta {
    text-align: center;
    margin-top: 32px;
    padding: 24px 0;
}

.collection-cta .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Active nav item */
.profile-dropdown-item.active {
    color: var(--accent) !important;
}

/* Mobile */
@media (max-width: 768px) {
    .collection-page {
        padding: 16px;
    }

    .collection-toolbar {
        flex-wrap: wrap;
    }

    .collection-search-row {
        width: 100%;
    }

    .collection-search-wrapper {
        max-width: none;
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .search-result-item {
        gap: 8px;
    }

    .search-results {
        max-height: 40vh;
        padding: 12px;
    }

    .search-results-header {
        margin-bottom: 8px;
    }

    /* Prevent iOS zoom on input focus (requires 16px minimum) */
    .collection-search-input,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .collection-list-meta {
        display: none;
    }

    .collection-connect-banner {
        flex-direction: column;
    }

    .collection-connect-banner .connect-discogs-btn-desktop {
        display: none;
    }

    .collection-connect-banner .connect-discogs-link {
        display: inline;
    }

    /* Full-screen scanner modal on mobile */
    .scanner-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--bg-primary);
        border-radius: 0;
        border: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .scanner-container.hidden {
        display: none;
    }

    .scanner-header {
        padding: 16px 20px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-subtle);
        margin-bottom: 0;
    }

    .scanner-header .btn-icon-action {
        width: 44px;
        height: 44px;
        font-size: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #scannerView {
        flex: 1;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #scannerView video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .scanner-hint {
        padding: 16px;
        margin: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-subtle);
    }

    .scanner-error {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== SYNC DISCOGS LINK ===== */
.collection-stats-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sync-discogs-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-duration) var(--transition-ease);
}

.sync-discogs-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.sync-discogs-link svg {
    width: 16px;
    height: 16px;
}

.sync-discogs-link.syncing {
    pointer-events: none;
    opacity: 0.7;
}

.sync-discogs-link.syncing svg {
    animation: spin 1s linear infinite;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: toastSlideUp var(--transition-duration-slow) var(--transition-ease);
    pointer-events: auto;
}

.toast.toast-exit {
    animation: toastSlideDown var(--transition-duration) var(--transition-ease) forwards;
}

.toast-icon {
    width: 24px;
    height: 24px;
    color: var(--success);
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-base);
}

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

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