:root {
    --bg-color: #ffffff;
    --sidebar-bg: #f8f8f8;
    --sidebar-border: #eeeeee;
    --accent-color: #00ff88;
    --text-primary: #111111;
    --text-secondary: #666666;
    --sidebar-width: 300px;
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
    --font-size-tiny: 0.8rem;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--font-size-tiny);
    overflow: hidden;
    height: 100vh;
}

#app {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 3rem 1.5rem;
    z-index: 10;
    gap: 2rem;
    align-items: stretch;
}

header {
    margin-bottom: 1rem;
    text-align: left;
}

h1 {
    font-family: var(--font-mono);
    font-size: var(--font-size-tiny);
    letter-spacing: 0.1em;
    font-weight: 600;
}

.control-group {
    margin-bottom: 2rem;
    width: 100%;
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--font-size-tiny); /* Standardized to 0.8rem */
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    letter-spacing: 0.05em;
    text-align: left;
}

/* Upload Zone */
.upload-zone {
    border: 1px dashed var(--sidebar-border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.upload-zone:hover {
    border-color: var(--accent-color);
    background: #fdfdfd;
}

.upload-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: var(--font-size-tiny);
    font-family: var(--font-mono);
    pointer-events: none;
}

.upload-inner i {
    width: 20px;
    height: 20px;
}

/* Sequence List */
.sequence-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.sequence-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem;
    background: white;
    border: 1px solid var(--sidebar-border);
    border-radius: 4px;
    animation: slideIn 0.3s ease-out;
}

.sequence-item .thumb {
    width: 24px;
    height: 24px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.sequence-item .name {
    flex-grow: 1;
    font-family: var(--font-mono);
    font-size: var(--font-size-tiny);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sequence-item button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ff4444;
    padding: 2px;
}

.empty-state {
    text-align: left;
    padding: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.6;
    font-size: var(--font-size-tiny);
}

/* Controls */
.slider-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    width: 100%;
}

.slider-item span {
    font-size: var(--font-size-tiny);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

input[type="range"] {
    width: 120px;
}

select {
    width: 120px;
    padding: 2px 4px;
    font-family: var(--font-mono);
    font-size: var(--font-size-tiny);
    border: 1px solid var(--sidebar-border);
    background: white;
}

/* Buttons */
.actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

button {
    font-family: var(--font-mono);
    font-size: var(--font-size-tiny); /* Standardized to 0.8rem */
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

button i {
    width: 16px;
    height: 16px;
}

.primary-btn {
    background-color: var(--text-primary);
    color: white;
    border: none;
    font-weight: 500;
    width: 100%;
}

.primary-btn:hover:not(:disabled) {
    background-color: #333;
}

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

.secondary-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--sidebar-border);
    width: 100%;
}

.secondary-btn:hover {
    background-color: #f0f0f0;
    color: var(--text-primary);
}

footer {
    margin-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: left;
}

/* Preview Area */
.preview-area {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.canvas-container {
    width: 500px;
    height: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background: white;
}

#canvas-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview-svg {
    width: 80%;
    height: 80%;
}

/* Status Overlay */
#status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top: 3px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}
