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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Navigation */
header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #2563eb;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo::before {
  content: "🎙️";
  font-size: 1.3rem;
  margin-right: 0.4rem;
}

.logo .voice {
  color: #1e3a5f;
}

.logo .two-text {
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-55%);
  flex-wrap: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 400;
  font-size: 1.15rem;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
}

.btn-signup {
  font-size: 1.4rem !important;
  padding: 0.4rem 1.25rem !important;
}

.nav-links a:hover {
  color: #2563eb;
}

.nav-links .download-disabled {
  color: #aaa;
  cursor: not-allowed;
  position: relative;
}

.nav-links .download-disabled:hover::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  margin-top: 0.5rem;
  z-index: 1000;
}

.nav-links .user-badge {
  color: #16a34a;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: #f0fdf4;
  border-radius: 20px;
  font-size: 0.875rem;
}

/* Buttons */
.btn-primary {
  background: #2563eb;
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
  font-weight: 600;
}

.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.btn-secondary {
  background: #f3f4f6;
  color: #333;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-large {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

/* Hero Section */
.hero {
  padding: 5rem 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #1e3a5f;
}

.tagline {
  font-size: 0.95rem;
  color: #555;
  max-width: 900px;
  margin: 0 auto 1rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-wide {
  max-width: 700px;
  margin: 0 auto;
  gap: 0.75rem;
}

.cta-wide .btn-large {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.btn-hero-download {
  padding: 0.75rem 2rem !important;
  font-size: 1.1rem !important;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
}

.btn-hero-download:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
}

/* Features Section */
.features {
  padding: 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features h2 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-wide {
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-wide h3 {
  color: #2563eb;
  font-size: 0.95rem;
  white-space: nowrap;
}

.feature-wide p {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

.feature-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.feature {
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.feature h3 {
  margin-bottom: 0.25rem;
  color: #2563eb;
  font-size: 0.95rem;
}

.feature p {
  font-size: 1rem;
  line-height: 1.4;
}

/* Feature Highlight - Full width card below feature grid */
.feature-highlight {
  margin-top: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.feature-highlight h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.feature-highlight p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 900px;
}

.feature-highlight .highlight-tagline {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-style: italic;
  font-size: 1.5rem;
  color: #fff;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.feature-highlight .highlight-attribution {
  text-align: right;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Download Section */
.download {
  padding: 5rem 2rem;
  text-align: center;
}

.download h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.download p {
  margin-bottom: 2rem;
  color: #555;
}

.system-req {
  font-size: 0.875rem;
  color: #888;
  margin-top: 1rem;
}

/* Footer */
footer {
  background: #1e3a5f;
  color: #fff;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  color: #93c5fd;
  text-decoration: none;
  margin: 0 1rem;
}

.footer-links a:hover {
  color: #fff;
}

/* Auth Pages (Register, Login, Verify, Download) */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.auth-card {
  background: #fff;
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 700px;
}

.back-link {
  display: block;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.back-link:hover {
  text-decoration: underline;
}

.auth-card h1 {
  font-size: 1.75rem;
  color: #1e3a5f;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-card .subtitle {
  color: #555;
  text-align: center;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.subtitle-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0.75rem 2rem;
}

.auth-card .subtitle-secondary {
  color: #666;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group .password-wrapper {
  position: relative;
}

.form-group .password-wrapper input {
  padding-right: 3rem;
}

.form-group .password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 0.85rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-group .password-toggle:hover {
  color: #2563eb;
}

.form-group .password-toggle .eye-icon {
  font-size: 1.1rem;
}

.form-group input.error {
  border-color: #dc2626;
}

.form-group .field-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.375rem;
  display: none;
}

.form-group input.error + .field-error {
  display: block;
}

.form-group .help-text {
  color: #888;
  font-size: 0.8rem;
  margin-top: 0.375rem;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-submit:hover {
  background: #1d4ed8;
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  background: #93c5fd;
  cursor: not-allowed;
  transform: none;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.alert-info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Auth Links */
.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.auth-links a {
  color: #2563eb;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* Verification Page */
.verify-status {
  text-align: center;
  padding: 2rem 0;
}

.verify-status .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.verify-status.success .icon {
  color: #16a34a;
}

.verify-status.error .icon {
  color: #dc2626;
}

.verify-status.loading .icon {
  color: #2563eb;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.verify-status h2 {
  margin-bottom: 0.5rem;
}

.verify-status p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* Download Page */
.download-card {
  text-align: center;
}

.download-card .product-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.download-card h1 {
  margin-bottom: 1rem;
}

.download-card .file-info {
  color: #666;
  margin-bottom: 2rem;
}

.download-card .btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.download-card .btn-download:hover {
  background: #15803d;
}

.download-card .instructions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  text-align: left;
}

.download-card .instructions h3 {
  margin-bottom: 1rem;
  color: #1e3a5f;
}

.download-card .instructions ol {
  color: #555;
  padding-left: 1.5rem;
}

.download-card .instructions li {
  margin-bottom: 0.5rem;
}

.download-card .free-notice {
  background: #f0fdf4;
  border: 1px solid #16a34a;
  color: #166534;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 500;
}

.download-card .file-size-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.download-card .download-note {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.download-card .download-times {
  background: #f9fafb;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.download-card .download-times h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: #333;
}

.download-card .download-times table {
  width: 100%;
  font-size: 0.85rem;
}

.download-card .download-times td {
  padding: 0.375rem 0;
  color: #555;
}

.download-card .download-times td:last-child {
  text-align: right;
  font-weight: 500;
  color: #2563eb;
}

.download-card .gpu-info {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  text-align: left;
}

.download-card .gpu-info h3 {
  margin-bottom: 0.5rem;
  color: #1e3a5f;
}

.download-card .gpu-info > p {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.download-card .gpu-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-card .gpu-option {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  border-left: 4px solid;
}

.download-card .gpu-option strong {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.download-card .gpu-option span {
  font-size: 0.85rem;
  color: #666;
}

.download-card .gpu-option.nvidia {
  background: #f0fdf4;
  border-left-color: #16a34a;
}

.download-card .gpu-option.nvidia strong {
  color: #16a34a;
}

.download-card .gpu-option.cpu {
  background: #eff6ff;
  border-left-color: #2563eb;
}

.download-card .gpu-option.cpu strong {
  color: #2563eb;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

/* Help Dropdown */
.help-dropdown {
  position: relative;
  display: inline-block;
}

.help-dropdown-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.4rem;
  color: #333;
  font-weight: 400;
  transition: color 0.2s;
}

.help-dropdown-btn:hover {
  color: #2563eb;
}

.help-dropdown.open .help-dropdown-btn {
  color: #2563eb;
}

.help-dropdown .dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.help-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.help-dropdown-content {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: #fff;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1000;
}

.help-dropdown.open .help-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.help-dropdown-content a {
  display: block;
  padding: 0.75rem 1rem;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s;
}

.help-dropdown-content a:hover {
  background: #f8fafc;
  color: #2563eb;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 2rem;
}

.loading-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

.loading-spinner p {
  color: #64748b;
}

/* CC Plus Download Page */
.ccplus-download-page .download-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.ccplus-download-page h1 {
  font-size: 2rem;
  color: #1e3a5f;
  margin-bottom: 0.5rem;
  text-align: center;
}

.download-intro {
  color: #64748b;
  text-align: center;
  margin-bottom: 2rem;
}

.download-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.download-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.download-card-header h2 {
  font-size: 1.4rem;
  color: #1e3a5f;
  margin: 0;
}

.download-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.download-description {
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.download-prereq {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #92400e;
}

.download-prereq a {
  color: #b45309;
  text-decoration: underline;
}

.download-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  min-width: 180px;
  justify-content: center;
}

.download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.download-icon {
  font-size: 1.1rem;
}

.download-links {
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.download-links a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
}

.download-links a:hover {
  text-decoration: underline;
}

.spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .auth-card {
    padding: 2rem;
    margin: 1rem;
  }

  .auth-content {
    padding: 6rem 1rem 2rem;
  }
}
