/* ============================================
LOGIC PRO X INSPIRED THEME
============================================ */
:root {
/* Logic Pro X Colors */
--bg-primary: #1b1e22;
--bg-secondary: #232629;
--bg-tertiary: #2a2d31;
--bg-card: #2a2d31;
--bg-input: #1b1e22;

/* Accent Colors */
--accent-blue: #63a4ff;
--accent-green: #4bff72;
--accent-orange: #ff9500;
--accent-red: #ff453a;

/* Text Colors */
--text-primary: #e6e6e6;
--text-secondary: #a0a0a5;
--text-muted: #707075;

/* Border & Shadow */
--border-color: #3a3d43;
--border-light: #4a4d53;
--shadow-dark: rgba(0,0,0,0.45);

/* Status Colors */
--success: #32d74b;
--error: #ff453a;
--warning: #ff9f0a;

/* Radii */
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 8px;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}

/* Subtle texture overlay like Logic Pro */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: 
    linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(99,164,255,0.03) 0%, transparent 50%);
pointer-events: none;
z-index: -1;
}

.container {
max-width: 1200px;
margin: 0 auto;
padding: 1.5rem;
}

/* Header - Logic Pro toolbar style */
header {
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(180deg, #2f3238 0%, #26292d 100%);
border-bottom: 1px solid #1a1c1f;
padding: 1rem 1.5rem;
margin: -1.5rem -1.5rem 1.5rem -1.5rem;
box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 2px 8px var(--shadow-dark);
}

.btn-logout {
background-color: #ff4d4d;
color: #fff;
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
}

.btn-logout:hover {
background-color: #e60000;
}

.logo {
display: flex;
align-items: center;
gap: 0.75rem;
}

.logo-icon {
width: 36px;
height: 36px;
background: linear-gradient(180deg, #4a4d52 0%, #36393e 100%);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
box-shadow: 0 1px 3px var(--shadow-dark);
}

.logo h1 {
font-size: 1.25rem;
font-weight: 500;
color: var(--text-primary);
letter-spacing: -0.02em;
}

.logo p {
font-size: 0.75rem;
color: var(--text-muted);
font-weight: 400;
}

/* Section titles */
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
}

.section-title {
font-size: 0.8rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
display: flex;
align-items: center;
gap: 0.5rem;
}

.section-title::before {
content: '';
width: 3px;
height: 14px;
background: var(--accent-blue);
border-radius: 2px;
}

/* Logic Pro Style Buttons */
.btn {
font-family: inherit;
font-weight: 500;
font-size: 0.8rem;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
cursor: pointer;
transition: all 0.15s ease;
display: inline-flex;
align-items: center;
gap: 0.4rem;
background: linear-gradient(180deg, #43464b 0%, #36393e 100%);
color: var(--text-primary);
box-shadow: 0 1px 2px var(--shadow-dark);
}

.btn:hover {
background: linear-gradient(180deg, #4b4e54 0%, #3c3f45 100%);
}

.btn:active {
background: linear-gradient(180deg, #36393e 0%, #2d3035 100%);
}

.btn-primary {
background: radial-gradient(circle at 30% 30%, #4bff72, #1ea641);
border: 1px solid #1ea641;
color: #0d240f;
box-shadow: 0 0 8px rgba(75,255,114,0.4), 0 1px 2px var(--shadow-dark);
}

.btn-primary:hover {
box-shadow: 0 0 12px rgba(75,255,114,0.6), 0 1px 2px var(--shadow-dark);
}

.btn-lalal {
background: linear-gradient(180deg, #ff9500 0%, #e68600 100%);
border: 1px solid #cc7700;
color: #1b1e22;
box-shadow: 0 0 6px rgba(255,149,0,0.3), 0 1px 2px var(--shadow-dark);
}

.btn-lalal:hover {
box-shadow: 0 0 10px rgba(255,149,0,0.5), 0 1px 2px var(--shadow-dark);
}

.btn-secondary {
background: linear-gradient(180deg, #43464b 0%, #36393e 100%);
color: var(--text-primary);
border: 1px solid var(--border-light);
}

.btn-secondary:hover {
border-color: var(--accent-blue);
}

.btn-danger {
background: linear-gradient(180deg, #5a3030 0%, #4a2525 100%);
color: #ff6b6b;
border: 1px solid #6a3535;
}

.btn-danger:hover {
background: linear-gradient(180deg, #6a3535 0%, #5a2a2a 100%);
}

.btn-sm {
padding: 0.35rem 0.75rem;
font-size: 0.75rem;
}

.btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}

/* Cards - Logic Pro panel style */
.card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1.25rem;
margin-bottom: 1rem;
box-shadow: 0 2px 6px var(--shadow-dark);
}

/* Project Grid */
.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1rem;
}

.project-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1rem;
transition: all 0.15s ease;
cursor: pointer;
position: relative;
box-shadow: 0 2px 6px var(--shadow-dark);
}

.project-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: var(--accent-blue);
opacity: 0;
transition: opacity 0.15s ease;
}

.project-card.lalal-source::before {
background: var(--accent-orange);
}

.project-card:hover {
border-color: var(--accent-blue);
box-shadow: 0 4px 12px var(--shadow-dark);
}

.project-card:hover::before {
opacity: 1;
}

.project-title {
font-size: 0.95rem;
font-weight: 500;
margin-bottom: 0.4rem;
color: var(--text-primary);
}

.project-meta {
display: flex;
gap: 0.75rem;
font-size: 0.7rem;
color: var(--text-muted);
margin-bottom: 0.75rem;
}

.project-meta span {
display: flex;
align-items: center;
gap: 0.2rem;
}

.project-actions {
display: flex;
gap: 0.4rem;
margin-top: 0.75rem;
}

/* Mode Selector - Logic Pro style tabs */
.mode-selector {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1.5rem;
}

.mode-card {
background: linear-gradient(180deg, #2a2d31 0%, #232629 100%);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1.25rem;
cursor: pointer;
transition: all 0.15s ease;
text-align: center;
box-shadow: 0 2px 4px var(--shadow-dark);
}

.mode-card:hover {
border-color: var(--accent-blue);
}

.mode-card.active {
border-color: var(--accent-blue);
background: linear-gradient(180deg, #2f3640 0%, #282c33 100%);
box-shadow: 0 0 8px rgba(99,164,255,0.2), 0 2px 4px var(--shadow-dark);
}

.mode-card.active.lalal-mode {
border-color: var(--accent-orange);
background: linear-gradient(180deg, #3a3025 0%, #302820 100%);
box-shadow: 0 0 8px rgba(255,149,0,0.2), 0 2px 4px var(--shadow-dark);
}

.mode-card-icon {
font-size: 2rem;
margin-bottom: 0.5rem;
}

.mode-card h3 {
font-size: 0.9rem;
font-weight: 500;
margin-bottom: 0.35rem;
color: var(--text-primary);
}

.mode-card p {
font-size: 0.75rem;
color: var(--text-secondary);
}

.mode-card .badge {
margin-top: 0.5rem;
display: inline-block;
}

/* Upload Zone - Logic Pro drop target style */
.upload-zone {
border: 2px dashed var(--border-light);
border-radius: var(--radius-lg);
padding: 2.5rem;
text-align: center;
transition: all 0.15s ease;
cursor: pointer;
background: var(--bg-input);
}

.upload-zone:hover,
.upload-zone.dragover {
border-color: var(--accent-blue);
background: rgba(99,164,255,0.05);
}

.upload-zone.lalal-zone:hover,
.upload-zone.lalal-zone.dragover {
border-color: var(--accent-orange);
background: rgba(255,149,0,0.05);
}

.upload-zone-icon {
font-size: 2.5rem;
margin-bottom: 0.75rem;
opacity: 0.7;
}

.upload-zone h3 {
font-size: 0.95rem;
font-weight: 500;
margin-bottom: 0.35rem;
color: var(--text-primary);
}

.upload-zone p {
font-size: 0.75rem;
color: var(--text-muted);
}

/* Stem Choice Selector */
.stem-choices {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 0.75rem;
}

.stem-choice {
cursor: pointer;
}

.stem-choice input[type="checkbox"] {
display: none;
}

.stem-choice-box {
display: flex;
align-items: center;
gap: 0.4rem;
padding: 0.5rem 0.75rem;
background: linear-gradient(180deg, #2a2d31 0%, #232629 100%);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
transition: all 0.15s ease;
box-shadow: 0 1px 3px var(--shadow-dark);
}

.stem-choice:hover .stem-choice-box {
border-color: var(--accent-orange);
}

.stem-choice input:checked + .stem-choice-box {
border-color: var(--accent-orange);
background: linear-gradient(180deg, #3a3025 0%, #302820 100%);
box-shadow: 0 0 6px rgba(255,149,0,0.3);
}

.stem-choice-icon {
font-size: 1rem;
}

.stem-choice-label {
font-size: 0.8rem;
font-weight: 500;
color: var(--text-primary);
}

.stem-help-text {
font-size: 0.7rem;
color: var(--text-muted);
margin-top: 0.5rem;
}

/* Stem List - Logic Pro track list style */
.stem-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.stem-item {
display: flex;
align-items: center;
gap: 0.75rem;
background: var(--bg-tertiary);
padding: 0.75rem;
border-radius: var(--radius-md);
border: 1px solid var(--border-color);
transition: all 0.15s ease;
box-shadow: 0 1px 3px var(--shadow-dark);
}

.stem-item:hover {
border-color: var(--accent-blue);
}

.stem-icon {
width: 32px;
height: 32px;
background: linear-gradient(180deg, #4a4d52 0%, #36393e 100%);
border: 1px solid var(--border-light);
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
font-size: 0.9rem;
flex-shrink: 0;
}

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

.stem-name-input {
font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
font-size: 0.8rem;
font-weight: 500;
background: var(--bg-input);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.4rem 0.6rem;
border-radius: var(--radius-sm);
width: 100%;
transition: all 0.15s ease;
}

.stem-name-input:focus {
outline: none;
border-color: var(--accent-blue);
box-shadow: 0 0 0 2px rgba(99,164,255,0.2);
}

.stem-file {
font-size: 0.7rem;
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 0.2rem;
}

.stem-size {
font-size: 0.7rem;
color: var(--text-muted);
font-family: SF Mono, Monaco, monospace;
}

.stem-remove {
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
padding: 0.4rem;
border-radius: var(--radius-sm);
transition: all 0.15s ease;
}

.stem-remove:hover {
color: var(--error);
background: rgba(255,69,58,0.15);
}

/* Form inputs - Logic Pro style */
.form-group {
margin-bottom: 1.25rem;
}

.form-label {
display: block;
font-size: 0.75rem;
font-weight: 500;
color: var(--text-secondary);
margin-bottom: 0.4rem;
text-transform: uppercase;
letter-spacing: 0.03em;
}

.form-input {
font-family: inherit;
width: 100%;
padding: 0.6rem 0.75rem;
background: var(--bg-input);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
color: var(--text-primary);
font-size: 0.85rem;
transition: all 0.15s ease;
}

.form-input:focus {
outline: none;
border-color: var(--accent-blue);
box-shadow: 0 0 0 2px rgba(99,164,255,0.2);
}

/* Embed Code Box - Logic Pro code display style */
.embed-box {
background: var(--bg-input);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 0.75rem;
font-family: SF Mono, Monaco, Consolas, monospace;
font-size: 0.7rem;
color: var(--accent-blue);
word-break: break-all;
position: relative;
max-height: 120px;
overflow-y: auto;
}

.copy-btn {
position: absolute;
top: 0.4rem;
right: 0.4rem;
background: linear-gradient(180deg, #43464b 0%, #36393e 100%);
border: 1px solid var(--border-light);
color: var(--text-secondary);
padding: 0.3rem 0.6rem;
border-radius: var(--radius-sm);
font-size: 0.65rem;
cursor: pointer;
transition: all 0.15s ease;
}

.copy-btn:hover {
background: var(--accent-blue);
color: var(--bg-primary);
border-color: var(--accent-blue);
}

.copy-btn.copied {
background: var(--success);
color: var(--bg-primary);
border-color: var(--success);
}

/* Modal - Logic Pro floating panel style */
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(8px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.2s ease;
}

.modal-backdrop.active {
opacity: 1;
visibility: visible;
}

.modal {
background: linear-gradient(180deg, #2f3238 0%, #26292d 100%);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1.5rem;
max-width: 550px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
transform: translateY(10px);
transition: transform 0.2s ease;
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-backdrop.active .modal {
transform: translateY(0);
}

.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.25rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-color);
}

.modal-title {
font-size: 1rem;
font-weight: 500;
color: var(--text-primary);
}

.modal-close {
background: linear-gradient(180deg, #43464b 0%, #36393e 100%);
border: 1px solid var(--border-light);
color: var(--text-secondary);
font-size: 1rem;
cursor: pointer;
padding: 0.25rem 0.5rem;
border-radius: var(--radius-sm);
transition: all 0.15s ease;
}

.modal-close:hover {
color: var(--text-primary);
background: linear-gradient(180deg, #4b4e54 0%, #3c3f45 100%);
}

/* Progress Bar - Logic Pro style */
.progress-bar {
height: 6px;
background: var(--bg-input);
border-radius: 3px;
overflow: hidden;
margin: 0.75rem 0;
border: 1px solid var(--border-color);
}

.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent-orange) 0%, #ffb340 100%);
width: 0%;
transition: width 0.3s ease;
}

.progress-text {
font-size: 0.75rem;
color: var(--text-secondary);
text-align: center;
margin-top: 0.4rem;
}

/* Empty State */
.empty-state {
text-align: center;
padding: 3rem 2rem;
color: var(--text-muted);
}

.empty-state-icon {
font-size: 3rem;
margin-bottom: 0.75rem;
opacity: 0.4;
}

.empty-state h3 {
font-size: 1rem;
font-weight: 500;
color: var(--text-secondary);
margin-bottom: 0.35rem;
}

/* Tabs - Logic Pro segmented control style */
.tabs {
display: flex;
gap: 0;
margin-bottom: 1.5rem;
background: var(--bg-input);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 3px;
width: fit-content;
}

.tab {
padding: 0.5rem 1.25rem;
background: transparent;
border: none;
border-radius: var(--radius-sm);
color: var(--text-secondary);
cursor: pointer;
font-family: inherit;
font-size: 0.8rem;
font-weight: 500;
transition: all 0.15s ease;
}

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

.tab.active {
color: var(--text-primary);
background: linear-gradient(180deg, #43464b 0%, #36393e 100%);
box-shadow: 0 1px 3px var(--shadow-dark);
}

/* Views */
.view {
display: none;
}

.view.active {
display: block;
}

/* Toast Notifications - Logic Pro alert style */
.toast-container {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
z-index: 2000;
display: flex;
flex-direction: column;
gap: 0.4rem;
}

.toast {
background: linear-gradient(180deg, #2f3238 0%, #26292d 100%);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 0.75rem 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
animation: slideIn 0.2s ease;
font-size: 0.8rem;
}

.toast.success {
border-left: 3px solid var(--success);
}

.toast.error {
border-left: 3px solid var(--error);
}

@keyframes slideIn {
from {
    transform: translateX(100%);
    opacity: 0;
}
to {
    transform: translateX(0);
    opacity: 1;
}
}

/* Embed Options */
.embed-options {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
.container {
    padding: 1rem;
}

header {
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
}

.projects-grid {
    grid-template-columns: 1fr;
}

.embed-options {
    grid-template-columns: 1fr;
}

.tabs {
    width: 100%;
}

.tab {
    flex: 1;
    text-align: center;
}

.mode-selector {
    grid-template-columns: 1fr;
}
}

/* Loading Spinner - Logic Pro style */
.spinner {
width: 20px;
height: 20px;
border: 2px solid var(--border-color);
border-top-color: var(--accent-blue);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}

.spinner.lalal {
border-top-color: var(--accent-orange);
}

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

.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(27, 30, 34, 0.9);
display: flex;
align-items: center;
justify-content: center;
z-index: 3000;
opacity: 0;
visibility: hidden;
transition: all 0.2s ease;
}

.loading-overlay.active {
opacity: 1;
visibility: visible;
}

.badge {
background: var(--accent-blue);
color: var(--bg-primary);
font-size: 0.6rem;
font-weight: 600;
padding: 0.15rem 0.4rem;
border-radius: 3px;
margin-left: 0.4rem;
text-transform: uppercase;
letter-spacing: 0.02em;
}

.badge.lalal {
background: var(--accent-orange);
color: var(--bg-primary);
}

.badge.warning {
background: rgba(255, 159, 10, 0.2);
color: var(--warning);
}

/* Processing Panel */
.processing-panel {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 1.5rem;
text-align: center;
box-shadow: 0 2px 6px var(--shadow-dark);
}

.processing-panel h3 {
font-size: 1rem;
font-weight: 500;
margin-bottom: 0.75rem;
color: var(--text-primary);
}

.processing-panel .spinner {
width: 36px;
height: 36px;
margin: 0 auto 0.75rem;
border-width: 3px;
}

/* API Key Notice */
.api-notice {
background: rgba(255, 159, 10, 0.08);
border: 1px solid rgba(255, 159, 10, 0.25);
border-radius: var(--radius-md);
padding: 0.75rem;
margin-bottom: 1.25rem;
display: flex;
align-items: flex-start;
gap: 0.6rem;
}

.api-notice-icon {
font-size: 1rem;
}

.api-notice p {
font-size: 0.75rem;
color: var(--text-secondary);
}

.api-notice code {
background: var(--bg-input);
padding: 0.15rem 0.35rem;
border-radius: 3px;
font-family: SF Mono, Monaco, monospace;
font-size: 0.7rem;
color: var(--accent-orange);
}

/* Scrollbar styling for Logic Pro look */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}

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

::-webkit-scrollbar-thumb {
background: var(--border-light);
border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
background: #5a5d63;
}