:root {
  --bg-primary: #0B0F19;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent-start: #6366F1;
  --accent-end: #A855F7;
  --accent: #818CF8;
  --danger: #EF4444;
  --success: #22C55E;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  position: relative;
  min-height: 100vh;
  padding-bottom: 40px;
}

/* Animated background */
.bg-mesh {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 60%, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.bg-glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.bg-glow-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
  bottom: 10%;
  left: -80px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Header */
.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.hamburger-btn {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--accent);
  transition: all 0.2s;
}

.hamburger-btn:hover {
  background: rgba(99, 102, 241, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-display {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo svg {
  stroke: var(--accent-start);
}

/* Main content */
main {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Generator Card */
.generator-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.15), rgba(99, 102, 241, 0.1));
  z-index: 0;
  opacity: 0.6;
}

.card-content {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* Inputs */
.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

input[type="text"],
textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* Buttons */
button {
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-small {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-weight: 600;
}

.btn-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-small.ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.media-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: 10px;
}

.media-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.media-btn svg {
  stroke: var(--accent);
}

.generate-btn {
  width: 100%;
  padding: 16px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.generate-btn:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}

.generate-btn .btn-icon {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.text-btn {
  background: transparent;
  color: var(--text-muted);
  padding: 4px 0;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.outline-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.outline-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* Collapsible Sections */
.collapse-section {
  border-top: 1px solid var(--border);
  padding: 2px 0;
}

.collapse-section:first-of-type {
  border-top: none;
}

.section-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.section-toggle .chevron {
  transition: transform 0.3s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.collapse-section.collapsed .chevron {
  transform: rotate(-90deg);
}

/* Advanced Toggle */
.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.advanced-label {
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.advanced-summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-right: auto;
}

.advanced-toggle .chevron {
  margin-left: 0;
}

.section-body {
  padding: 0 0 12px;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
}

.collapse-section.collapsed .section-body {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding-top: 4px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.control-group.wide {
  grid-column: 1 / -1;
}

.control-group label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0.8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Toggles shared */
.mode-toggle,
.quality-toggle,
.images-count-toggle,
.page-count-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.mode-btn,
.quality-btn,
.images-count-btn,
.page-count-btn {
  padding: 5px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active,
.quality-btn.active,
.images-count-btn.active,
.page-count-btn.active {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mode-btn:not(.active):hover,
.quality-btn:not(.active):hover,
.images-count-btn:not(.active):hover,
.page-count-btn:not(.active):hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Select Input */
.select-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.select-input:hover {
  border-color: var(--accent);
}

.select-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

/* Style Pills */
.style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.style-pill {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.style-pill:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.style-pill.active {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* Images */
.images-section {
  margin-bottom: 16px;
}

.section-body .hint {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-bottom: 8px;
  opacity: 0.7;
}

.image-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.image-item {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
}

.image-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  pointer-events: none;
  transition: border-color 0.2s;
}

.image-item:hover::after {
  border-color: var(--border-focus);
}

.image-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.image-item:hover img {
  transform: scale(1.05);
}

.image-item .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--bg-primary);
  font-size: 13px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s;
}

.image-item .remove-btn:hover {
  transform: scale(1.15);
}

/* Slides Section */
.slides-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.slides-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

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

/* History Sidebar */
.history-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.history-sidebar.hidden {
  transform: translateX(100%);
}

.history-sidebar:not(.hidden) {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.history-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
}

.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-mode {
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.history-delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.history-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.history-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.history-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.history-images .history-image {
  width: 100%;
  height: 80px;
  margin-bottom: 0;
  cursor: pointer;
  transition: transform 0.2s;
}

.history-images .history-image:hover {
  transform: scale(1.05);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-footer .text-btn {
  width: 100%;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: var(--danger);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sidebar-footer .text-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.slide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.slide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  opacity: 0;
  transition: opacity 0.3s;
}

.slide-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(99, 102, 241, 0.2);
}

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

.slide-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  background: var(--bg-secondary);
}

.slide-number {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 12px;
}

.slide-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.slide-body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.slide-body ul {
  padding-left: 18px;
  margin-top: 6px;
}

.slide-body li {
  margin-bottom: 4px;
}

/* Slide Modal */
.slide-modal-content {
  width: 100%;
  max-width: 900px;
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

#slide-modal-inner {
  background: linear-gradient(145deg, #111827, #1E293B);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-height: 100%;
  overflow-y: auto;
}

#slide-modal-inner .slide-number {
  margin-bottom: 16px;
}

.slide-modal-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.slide-modal-content-wrapper {
  flex: 1;
  min-width: 0;
}

.slide-modal-image {
  width: 45%;
  max-width: 400px;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

#slide-modal-inner .slide-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

#slide-modal-inner .slide-body {
  font-size: 1rem;
  line-height: 1.6;
}

/* Mobile - stack vertically */
@media (max-width: 768px) {
  .slide-modal-layout {
    flex-direction: column;
  }

  .slide-modal-image {
    width: 100%;
    max-width: none;
    max-height: 40vh;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Auth Modal */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  position: relative;
}

#auth-modal .modal-content h2 {
  margin-bottom: 24px;
  font-size: 1.5rem;
  color: var(--text-primary);
}

#auth-form .form-group {
  margin-bottom: 20px;
}

#auth-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#auth-form input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
}

#auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

#auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#auth-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-switch .text-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  margin-left: 4px;
}

.auth-switch .text-btn:hover {
  text-decoration: underline;
}

#modal-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

/* Login Page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  position: relative;
}

.logo-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-centered svg {
  color: var(--accent);
}

.logo-centered h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  text-align: center;
}

.login-card .form-group {
  margin-bottom: 20px;
}

.login-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.login-card .primary-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.login-card .primary-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.login-card .primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-switch .text-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  margin-left: 4px;
}

.login-switch .text-btn:hover {
  text-decoration: underline;
}

.error-message {
  margin-top: 16px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: var(--danger);
  font-size: 0.9rem;
  text-align: center;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 640px) {
  .app-header {
    padding: 16px;
  }

  .logo span {
    display: none;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  main {
    padding: 0 16px;
  }

  .card-content {
    padding: 20px;
  }

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

  #slide-modal-inner {
    padding: 24px;
    min-height: 300px;
  }

  #slide-modal-inner .slide-title {
    font-size: 1.3rem;
  }

  .slides-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .image-buttons {
    flex-direction: column;
  }

  .media-btn {
    width: 100%;
  }
}
