.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: var(--shadow);
}

.auth-brand { margin-bottom: 2rem; }

.auth-brand h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-drive-login {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    text-decoration: none;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-drive-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.auth-divider {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

.auth-footnote {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0;
}

.auth-footnote a {
    color: var(--accent-light);
}

/* Login form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-error {
    color: #e85d5d;
    font-size: 0.85rem;
    text-align: center;
}

.auth-form .btn-primary {
    margin-top: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: color 0.2s;
}
.btn-link:hover { color: var(--accent-light); }

.slides-page { min-height: 100vh; background: var(--bg-primary); }
.slides-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.slides-header h1 { font-size: 1.3rem; }
.header-right { display: flex; gap: 0.75rem; }
.slides-content { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.slides-empty { text-align: center; padding: 4rem 2rem; }
.slides-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.slides-empty h3 { color: var(--text-primary); margin-bottom: 0.5rem; }
.slides-empty p { color: var(--text-muted); margin-bottom: 1.5rem; }

.slides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }

.slide-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.slide-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--shadow); }

.slide-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.slide-count {
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.slide-title { padding: 0.75rem 1rem 0.25rem; font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-meta { padding: 0 1rem 0.75rem; font-size: 0.8rem; color: var(--text-muted); }

.slide-delete {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: rgba(0,0,0,0.5); border: none; color: white;
    font-size: 0.9rem; cursor: pointer; opacity: 0;
    border-radius: 50%; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.2s;
}
.slide-card:hover .slide-delete { opacity: 1; }
.slide-delete:hover { background: var(--accent-primary); }

.editor-page { min-height: 100vh; background: var(--bg-primary); display: flex; flex-direction: column; }

.editor-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1.5rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 1rem; flex: 1; }
.header-right { display: flex; align-items: center; gap: 1rem; }

.btn-back { background: none; border: none; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; white-space: nowrap; }
.btn-back:hover { color: var(--accent-light); }

.title-input {
    background: transparent; border: none; color: var(--text-primary);
    font-size: 1.1rem; font-weight: 600; font-family: var(--font);
    outline: none; max-width: 300px; width: 100%; padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
}
.title-input:focus { background: var(--bg-hover); }
.save-status { font-size: 0.8rem; color: var(--text-muted); }
.slide-counter { font-size: 0.85rem; color: var(--text-muted); }

.editor-layout { display: flex; flex: 1; overflow: hidden; }

/* Sidebar thumbnails */
.slide-sidebar {
    width: 160px; background: var(--bg-secondary); border-right: 1px solid var(--border);
    padding: 1rem 0.75rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem;
}

.thumb {
    height: 80px; border-radius: var(--radius-sm); border: 2px solid transparent;
    cursor: pointer; position: relative; display: flex; align-items: center;
    justify-content: center; transition: all 0.2s;
}
.thumb.active { border-color: var(--accent-light); }
.thumb:hover { border-color: var(--accent-primary); }

.thumb-num {
    position: absolute; bottom: 4px; left: 6px;
    font-size: 0.7rem; color: rgba(255,255,255,0.6);
}

.thumb-delete {
    position: absolute; top: 2px; right: 4px;
    background: rgba(0,0,0,0.5); border: none; color: white;
    font-size: 0.7rem; cursor: pointer; opacity: 0; border-radius: 50%;
    width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
}
.thumb:hover .thumb-delete { opacity: 1; }

.btn-add-slide {
    background: var(--bg-hover); border: 1px dashed var(--border); color: var(--text-muted);
    padding: 0.5rem; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.85rem; transition: all 0.2s;
}
.btn-add-slide:hover { border-color: var(--accent-light); color: var(--accent-light); }

/* Canvas */
.slide-canvas-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 2rem; overflow: auto; }

.slide-canvas {
    width: 100%; max-width: 960px; aspect-ratio: 16/9;
    border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3); position: relative;
}

.slide-editable {
    width: 100%; height: 100%; padding: 3rem; color: white;
    font-size: 1.5rem; text-align: center; outline: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.slide-editable h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.slide-editable h2 { font-size: 2rem; margin-bottom: 0.75rem; }

/* Background picker */
.bg-picker {
    display: flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem;
}
.bg-picker span { font-size: 0.85rem; color: var(--text-muted); }

.bg-swatch {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid transparent; cursor: pointer; transition: all 0.2s;
}
.bg-swatch.active { border-color: var(--accent-light); transform: scale(1.2); }
.bg-swatch:hover { border-color: var(--text-muted); }

:root {
  /* Atlas Slides — Yellow/Amber accent */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1716;
  --bg-card: #221e1a;
  --bg-hover: #2a2520;
  --accent-primary: #d97706;
  --accent-soft: #b45309;
  --accent-dark: #92400e;
  --accent-muted: #78350f;
  --accent-light: #fbbf24;
  --text-primary: #f5efe6;
  --text-secondary: #c4b8a8;
  --text-muted: #8a7e70;
  --border: #3d352a;
  --success: #2d8a5e;
  --warning: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --font: 'DM Sans', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent-light); }
button { font-family: var(--font); cursor: pointer; }
input, textarea { font-family: var(--font); }
#root { min-height: 100vh; }

.loading-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; color: var(--text-secondary); font-size: 1.1rem;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-soft));
  color: white; border: none; padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; transition: all 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-hover); color: var(--text-primary);
  border: 1px solid var(--border); padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9rem; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--text-muted); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-card {
  background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); width: 90%; max-width: 420px;
}
.modal-card h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.modal-card input {
  width: 100%; padding: 0.6rem; border-radius: var(--radius-sm);
  background: var(--bg-primary); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 0.95rem; margin-bottom: 1rem;
}
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

