:root {
  --accent1: #8b5cf6;
  --accent2: #06b6d4;
  --bg: #0B0F1A;
  --surface: #111827;
  --text: #f1f5f9;
  --radius: 0.75rem;
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Inter", Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Header */
.header {
  background: var(--surface);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid #1f2937;
  position: sticky; top: 0; z-index: 300;
}
.logo { 
  font-size: 1.2rem; 
  font-weight: 800; 
  text-decoration: none; 
  color: var(--text); 
  transition: all 0.3s ease;
}
.logo:hover { 
  color: var(--accent2); 
  text-decoration: none; 
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  background: #0f172a; border: 1px solid #1f2937;
  color: var(--text); width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent2); }

/* Notice */
.notice {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: white; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin: 14px 16px; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.notice-text { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.join-btn {
  background: white; color: #111827; padding: 6px 14px;
  border-radius: 9999px; font-weight: 700; text-decoration: none;
}

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: -100%;
  width: 300px; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(17, 24, 39, 0.95) 100%);
  padding: 20px; z-index: 400;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: left .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}
.sidebar.show { left: 0; }
.sidebar .logo { 
  font-size: 1.3rem; 
  font-weight: 800; 
  margin-bottom: 20px; 
  color: var(--accent2);
  text-align: center;
  padding: 12px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Sidebar search */
.searchbar { 
  position: relative; 
  margin-bottom: 20px; 
}
.searchbar input {
  width: 100%; 
  height: 45px; 
  padding: 0 16px 0 45px;
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; 
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}
.searchbar input:focus {
  outline: none;
  border-color: var(--accent2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}
.searchbar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.searchbar i { 
  position: absolute; 
  left: 16px; 
  top: 50%; 
  transform: translateY(-50%); 
  color: var(--accent2);
  font-size: 16px;
}

/* Sidebar nav */
.sidebar nav { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
}
.sidebar nav a {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 12px 16px; 
  border-radius: 10px;
  color: var(--text); 
  text-decoration: none; 
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.sidebar nav a:hover { 
  background: rgba(6, 182, 212, 0.1); 
  color: var(--accent2); 
  border-color: rgba(6, 182, 212, 0.2);
  transform: translateX(4px);
}
.sidebar nav a i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  opacity: 0.8;
}

/* Accordion */
.accordion { 
  margin: 8px 0; 
  border-radius: 12px;
  overflow: hidden;
}
.accordion-header {
  width: 100%; 
  border: none; 
  cursor: pointer; 
  padding: 14px 16px;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  border-radius: 10px; 
  color: var(--text); 
  font-weight: 600;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.03); 
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}
.accordion-header:hover {
  background: rgba(6, 182, 212, 0.1); 
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--accent2);
  transform: translateX(4px);
}
.accordion-header .label { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}
.accordion-header .label i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  opacity: 0.8;
}
.accordion-header .arrow { 
  transition: transform 0.3s ease; 
  font-size: 14px;
  opacity: 0.7;
}
.accordion.active .arrow { 
  transform: rotate(90deg); 
  opacity: 1;
}
.accordion-content {
  max-height: 0; 
  overflow: hidden; 
  transition: max-height 0.3s ease;
  display: flex; 
  flex-direction: column; 
  gap: 6px;
  margin-top: 8px; 
  padding-left: 16px;
}
.accordion-content a {
  padding: 10px 14px; 
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin: 2px 0; 
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: 500;
}
.accordion-content a:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.15);
  color: var(--accent2);
  transform: translateX(4px);
}
.accordion-content a i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}
.accordion.active .accordion-content {
  max-height: 600px;
}

/* Subsection styles */
.subsection {
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: all 0.3s ease;
}
.subsection:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.subsection-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent2);
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.subsection a {
  margin: 3px 0;
  padding: 8px 10px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}
.subsection a:hover {
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent2);
  border-color: rgba(6, 182, 212, 0.15);
  transform: translateX(4px);
}

/* Dropdown styles */
.dropdown-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--accent2);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all .2s ease;
  margin-bottom: 4px;
}
.dropdown-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
}
.dropdown-btn:active {
  transform: translateY(0);
}
.dropdown-btn span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dropdown-arrow {
  transition: transform .3s ease;
  font-size: 0.8rem;
  color: var(--accent2);
}
.dropdown-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}
.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease, transform .3s ease;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-10px);
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
}
.subsection.active .dropdown-content {
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
  padding: 8px;
}
.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all .2s ease;
  background: transparent;
  border: 1px solid transparent;
}
.dropdown-content a:hover {
  background: rgba(255,255,255,.08);
  color: var(--accent2);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateX(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.dropdown-content a i {
  width: 16px;
  text-align: center;
  color: var(--accent2);
  opacity: 0.8;
}

/* Overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 350;
}
.overlay.show { opacity: 1; visibility: visible; }

/* Main */
.main { padding: 16px; }
.section { margin: 30px 0; }
.section h2 {
  font-size: 1.05rem; font-weight: 800;
  padding: 10px 14px; border-radius: 10px; margin: 0 0 14px;
  color: #fff; background: linear-gradient(90deg, #06b6d4, #3b82f6);
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
}

/* CC Generator Specific Styles */
.cc-generator-container {
  margin-top: 20px;
}

.generator-form {
  background: var(--surface);
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 0.8) 100%);
}

#app {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

/* Form styles */
.form-control {
    display: block;
    width: 100%;
    height: 45px;
    padding: 10px 15px;
    font-size: 15px;
    line-height: 1.42857143;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-group {
  margin-bottom: 15px;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Button styles */
.btn {
    display: inline-block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
    text-align: center;
  border: none;
  border-radius: 8px;
    cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.btn:active {
  transform: translateY(0);
}

.btn-block {
  width: 100%;
    display: block;
}

.copy-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
  position: relative;
  overflow: hidden;
}

.copy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.copy-btn:hover::before {
  left: 100%;
}

.copy-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.copy-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.copy-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.copy-btn:disabled::before {
  display: none;
}

.copy-btn i {
  font-size: 18px;
}

/* Textarea styles */
textarea.form-control {
  height: auto;
  min-height: 200px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
}

/* Label styles */
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--accent2);
  font-size: 14px;
}

/* Select styles */
select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  padding-right: 40px;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
}

select.form-control option {
  background-color: var(--surface);
  color: var(--text);
  padding: 8px 12px;
}

select.form-control:focus {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Fix for selected option visibility */
select.form-control option:checked {
  background-color: var(--accent2);
  color: white;
}

select.form-control option:hover {
  background-color: rgba(6, 182, 212, 0.2);
}

/* Info section */
.info-section {
  margin-top: 40px;
}

.info-section h3 {
  font-size: 1.1rem;
    font-weight: 700;
  color: var(--accent2);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.info-card p {
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #fbbf24;
  font-weight: 500;
}

.info-card i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

/* CTAs */
.see-all {
  display: inline-block; margin: 6px auto; text-align: center;
  padding: 12px 18px; border-radius: 9999px; font-weight: 800;
  color: #0B0F1A; background: linear-gradient(90deg, var(--accent1), var(--accent2));
  text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Light theme */
body.light { --bg:#f8fafc; --surface:#ffffff; --text:#0b1220; }
body.light .icon-btn { background:#f1f5f9; border-color:#e2e8f0; }
body.light .logo { color: var(--text); }
body.light .logo:hover { color: var(--accent2); }
body.light .sidebar nav a:hover { background:#f1f5f9; }
body.light .accordion-header { background:#ffffff; border-color:#e2e8f0; }
body.light .accordion-header:hover { background:#f1f5f9; }
body.light .accordion-content a { background:#ffffff; border-color:#e2e8f0; }
body.light .accordion-content a:hover { background:#f1f5f9; }
body.light .subsection { background:#f8fafc; border-color:#e2e8f0; }
body.light .subsection:hover { background:#f1f5f9; border-color:#cbd5e1; }
body.light .subsection-header { background:rgba(6, 182, 212, 0.1); }
body.light .dropdown-btn { background:rgba(6, 182, 212, 0.1); }
body.light .dropdown-btn:hover { background:rgba(6, 182, 212, 0.2); }
body.light .dropdown-content { background:#f8fafc; border-color:#e2e8f0; }
body.light .dropdown-content a:hover { background:#f1f5f9; border-color:rgba(6, 182, 212, 0.3); }
body.light .generator-form, body.light .generator-results { 
  background: #ffffff; 
  border-color: #e2e8f0; 
}
body.light .form-control { 
  background: #f8fafc; 
  border-color: #e2e8f0; 
  color: var(--text);
}
body.light .form-control:focus { 
  background: #ffffff; 
  border-color: var(--accent2); 
}
body.light select.form-control { 
  background-color: #f8fafc; 
}
body.light select.form-control:focus { 
  background-color: #ffffff; 
}
body.light select.form-control option { 
  background-color: #ffffff; 
  color: var(--text); 
}
body.light select.form-control option:checked { 
  background-color: var(--accent2); 
  color: white; 
}
body.light select.form-control option:hover { 
  background-color: rgba(6, 182, 212, 0.1); 
}

/* Responsive */
@media (max-width: 768px) {
  #app {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .generator-form {
    padding: 16px;
  }
  
  .notice { 
    flex-direction: column; 
    gap: 10px; 
    align-items: stretch; 
  }
  .join-btn { 
    text-align: center; 
  }
  
  .sidebar {
    width: 280px;
    padding: 16px;
  }
  
  .sidebar .logo {
    font-size: 1.2rem;
    padding: 10px;
  }
  
  .searchbar input {
    height: 40px;
    padding: 0 14px 0 40px;
  }
  
  .accordion-header {
    padding: 12px 14px;
    font-size: 13px;
  }
  
  .accordion-content a {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 12px;
  }
  
  .section h2 {
    font-size: 1rem;
    padding: 8px 12px;
  }
  
  .generator-form {
    padding: 12px;
  }
  
  .copy-btn, .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}
