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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #111;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #0088ff;
  text-decoration: none;
  margin-bottom: 40px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar-nav a {
  color: #888;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar-nav a.active {
  background: rgba(0, 102, 204, 0.2);
  color: #0088ff;
}

.sidebar-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 0;
}

.btn-logout:hover {
  color: white;
}

/* Main Content */
.main {
  flex: 1;
  margin-left: 240px;
  padding: 32px 40px;
}

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

.header h1 {
  font-size: 28px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: #0066cc;
  color: white;
}

.btn-primary:hover {
  background: #0077ee;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-link {
  background: none;
  border: none;
  color: #0088ff;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

/* Banner */
.banner {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner-warning {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.empty-state h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.empty-state p {
  color: #888;
  margin-bottom: 24px;
}

/* Canvas Grid */
.canvas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.canvas-card-wrapper {
  position: relative;
}

.canvas-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.canvas-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-delete-canvas {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: #888;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}

.canvas-card-wrapper:hover .btn-delete-canvas {
  opacity: 1;
}

.btn-delete-canvas:hover {
  background: #dc3545;
  color: white;
}

.canvas-card-preview {
  aspect-ratio: 16/10;
  background: #1a1a1a;
}

.canvas-card-info {
  padding: 16px;
}

.canvas-card-info h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.canvas-card-info p {
  color: #888;
  font-size: 13px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.modal-content h2 {
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: #0066cc;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Plan Badge & Upgrade */
.plan-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 16px;
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-tier {
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-status {
  font-size: 11px;
  color: #f59e0b;
}

.plan-status.status-canceling {
  color: #f59e0b;
}

.btn-upgrade {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-upgrade:hover {
  opacity: 0.9;
}

.btn-upgrade.btn-manage {
  background: rgba(255, 255, 255, 0.1);
}

/* Upgrade Modal */
.modal-upgrade {
  max-width: 400px;
  text-align: center;
}

.upgrade-features {
  text-align: left;
  margin: 24px 0;
}

.upgrade-features p {
  color: #888;
  margin-bottom: 12px;
}

.upgrade-features ul {
  list-style: none;
}

.upgrade-features li {
  padding: 8px 0;
  color: #ccc;
}

.upgrade-price {
  margin: 24px 0;
}

.upgrade-price .price {
  font-size: 48px;
  font-weight: 700;
}

.upgrade-price .period {
  color: #888;
  font-size: 16px;
}

.upgrade-note {
  margin-top: 16px;
  font-size: 12px;
  color: #666;
}

/* Utilities */
.hidden {
  display: none !important;
}
