/* SERIUXMOD OAuth2 Authentication Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Scrollbar - passend zum Dark Theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 10, 10, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 102, 0, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 102, 0, 0.5);
}

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

/* Firefox Scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 102, 0, 0.3) rgba(10, 10, 10, 0.5);
}

body.bg-auth {
  background: #0a0a0a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #e8e8e8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-x: hidden;
}

.auth-shell,
.auth-main {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

/* Clean Card mit subtileren orangenen Border-Glow wie auf Referenz-Bild */
/* Mehr Padding und abgerundete Ecken für weniger gequetschtes Layout */
.auth-card {
  background: rgba(13, 13, 13, 0.98);
  border: 1px solid;
  border-image: linear-gradient(
      135deg,
      rgba(255, 102, 0, 0.8) 0%,
      rgba(255, 102, 0, 0.2) 50%,
      rgba(255, 102, 0, 0.6) 100%
    )
    1;
  border-radius: 16px; /* Updated from 12px */
  padding: 56px 48px 40px; /* Updated from 48px */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 102, 0, 0.08) inset;
  position: relative;
  overflow: visible;
  min-height: 600px; /* Added */
  display: flex; /* Added */
  flex-direction: column; /* Added */
}

/* Subtiler Orange-Glow um die Card herum */
.auth-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px; /* Updated from 12px */
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.5), rgba(255, 102, 0, 0.1), rgba(255, 102, 0, 0.3));
  z-index: -1;
  opacity: 0.4;
  filter: blur(8px);
}

.auth-brand,
.auth-header {
  text-align: center;
  margin-bottom: 48px; /* Updated from 40px */
  position: relative;
  z-index: 1;
}

.auth-logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(255, 102, 0, 0.3));
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 15px;
  color: #888;
  font-weight: 400;
}

/* Multi-Step Progress Bar hinzugefügt */
.progress-bar-container {
  margin: 24px 0 0 0;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 18px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6600, #ff8833);
  transition: width 0.4s ease;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #666;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.progress-step.active .step-circle,
.progress-step.completed .step-circle {
  background: #ff6600;
  border-color: #ff6600;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.4);
}

.progress-step.completed .step-circle {
  background: #ff7518;
}

.step-label {
  font-size: 11px;
  color: #666;
  font-weight: 500;
  text-align: center;
  transition: color 0.3s ease;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: #ff6600;
  font-weight: 600;
}

.auth-alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
}

.auth-alert--error {
  background: rgba(255, 87, 87, 0.08);
  border-color: rgba(255, 87, 87, 0.3);
  color: #ffb3b3;
}

.auth-alert--success {
  background: rgba(60, 250, 123, 0.08);
  border-color: rgba(60, 250, 123, 0.3);
  color: #8fffb3;
}

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
}

.alert-success {
  background: rgba(60, 250, 123, 0.08);
  border-color: rgba(60, 250, 123, 0.3);
  color: #8fffb3;
}

.alert-danger {
  background: rgba(255, 87, 87, 0.08);
  border-color: rgba(255, 87, 87, 0.3);
  color: #ffb3b3;
}

.auth-form {
  margin-bottom: 28px;
  flex-grow: 1; /* Added */
}

/* Cleaner, kleinerer Label-Stil */
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 8px;
  margin-top: 18px;
}

.auth-label:first-of-type {
  margin-top: 0;
}

.password-wrapper {
  position: relative;
}

/* Input-Felder mit besserem Kontrast und cleanerem Look */
.auth-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  transition: all 0.2s ease;
  font-weight: 400;
}

.password-wrapper .auth-input {
  padding-right: 48px;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(255, 102, 0, 0.6);
  background: rgba(20, 20, 20, 1);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.12);
}

.auth-input::placeholder {
  color: #555;
  font-weight: 400;
}

/* Subtilerer Password Toggle Button */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 6px;
}

.password-toggle:hover {
  color: #ff6600;
  background: rgba(255, 102, 0, 0.08);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  font-size: 14px;
  color: #aaa;
  cursor: pointer;
  font-weight: 400;
}

.auth-check input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #ff6600;
}

/* Button mit cleanerem Stil */
.auth-btn,
.btn-auth {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 8px;
}

.auth-btn--primary,
.btn-auth {
  background: #ff6600;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 102, 0, 0.3);
}

.auth-btn--primary:hover,
.btn-auth:hover {
  background: #ff7518;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.auth-btn--primary:active,
.btn-auth:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

/* Cleaner Link-Stil */
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.auth-links a {
  color: #ff6600;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

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

/* Neuer Footer-Bereich für Passkey/Register Links */
.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.auth-footer-link {
  color: #ff6600;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.auth-footer-link:hover {
  color: #ff7518;
  text-decoration: underline;
}

/* Copyright-Bereich unten in der Card */
.auth-copyright {
  text-align: center;
  padding-top: 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: #666;
  position: relative;
  z-index: 1;
}

.auth-copyright a {
  color: #ff6600;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.auth-copyright a:hover {
  color: #ff7518;
  text-decoration: underline;
}

.auth-text {
  color: #999;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  font-weight: 400;
}

.profile-block {
  margin: 24px 0;
}

.avatar {
  display: block;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 102, 0, 0.3);
}

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

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

.form-group input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(255, 102, 0, 0.6);
  background: rgba(20, 20, 20, 1);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.12);
}

h3 {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 12px;
  font-weight: 700;
}

h4 {
  font-size: 18px;
  color: #ffffff;
  margin-top: 24px;
  font-weight: 600;
}

code {
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: rgba(255, 102, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ff9944;
}

strong {
  color: #fff;
  font-weight: 700;
}

/* ================================== */
/* Profile Page with Sidebar Layout   */
/* ================================== */

.profile-layout {
  display: flex;
  width: 100%;
  max-width: 1200px;
  min-height: auto;
  gap: 0;
  margin: 0 auto;
}

/* Sidebar */
.profile-sidebar {
  width: 280px;
  min-width: 280px;
  background: rgba(13, 13, 13, 0.98);
  border: 1px solid rgba(255, 102, 0, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px 0 0 16px;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.profile-sidebar::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, rgba(255, 102, 0, 0.3), rgba(255, 102, 0, 0.02));
  z-index: -1;
  opacity: 0.4;
  filter: blur(12px);
}

.sidebar-brand {
  text-align: center;
  padding: 0 28px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.sidebar-logo {
  max-width: 80px;
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(255, 102, 0, 0.3));
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.sidebar-subtitle {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  color: #999;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.sidebar-nav-item:hover {
  background: rgba(255, 102, 0, 0.06);
  color: #fff;
  border-left-color: rgba(255, 102, 0, 0.4);
}

.sidebar-nav-item.active {
  background: rgba(255, 102, 0, 0.1);
  color: #ff6600;
  border-left-color: #ff6600;
  font-weight: 600;
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-nav-item.active svg {
  opacity: 1;
}

/* Sidebar Footer / Logout */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  color: #ff5757;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.sidebar-logout:hover {
  color: #ff7070;
}

.sidebar-logout svg {
  width: 20px;
  height: 20px;
}

/* Main Content Area */
.profile-content {
  flex: 1;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 102, 0, 0.25);
  border-left: none;
  border-radius: 0 16px 16px 0;
  padding: 48px 56px;
  position: relative;
  overflow: visible;
}

.profile-content::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 0 16px 16px 0;
  background: linear-gradient(180deg, rgba(255, 102, 0, 0.3), rgba(255, 102, 0, 0.02));
  z-index: -1;
  opacity: 0.4;
  filter: blur(12px);
}

.content-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.content-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.content-subtitle {
  font-size: 15px;
  color: #777;
  margin: 0;
  line-height: 1.5;
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Info Cards innerhalb des Contents */
.info-card {
  background: rgba(18, 18, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.info-card-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-card-title svg {
  width: 20px;
  height: 20px;
  color: #ff6600;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row:first-of-type {
  padding-top: 0;
}

.info-label {
  font-size: 14px;
  color: #888;
  font-weight: 400;
}

.info-value {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  text-align: right;
}

.info-value.status-active {
  color: #3cfa7b;
}

.info-value.status-inactive {
  color: #ff9100;
}

/* Small action buttons */
.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-small--primary {
  background: #ff6600;
  color: #fff;
}

.btn-small--primary:hover {
  background: #ff7518;
}

.btn-small--danger {
  background: rgba(255, 87, 87, 0.15);
  color: #ff5757;
  border: 1px solid rgba(255, 87, 87, 0.3);
}

.btn-small--danger:hover {
  background: rgba(255, 87, 87, 0.25);
}

.btn-small--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-small--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Device List */
.device-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: rgba(18, 18, 18, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.device-item:hover {
  background: rgba(22, 22, 22, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

.device-item:last-child {
  margin-bottom: 0;
}

.device-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 102, 0, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6600;
  flex-shrink: 0;
}

.device-icon svg {
  width: 24px;
  height: 24px;
}

.device-info {
  flex: 1;
  min-width: 0;
}

.device-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.device-details {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.device-current {
  font-size: 12px;
  color: #3cfa7b;
  background: rgba(60, 250, 123, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

/* Connected Account Item */
.connected-account {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: rgba(18, 18, 18, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.connected-account:hover {
  background: rgba(22, 22, 22, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

.connected-account:last-child {
  margin-bottom: 0;
}

.connected-account-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.connected-account-icon.discord {
  background: rgba(88, 101, 242, 0.2);
  color: #5865F2;
}

.connected-account-icon.google {
  background: rgba(234, 67, 53, 0.2);
  color: #EA4335;
}

.connected-account-icon.microsoft {
  background: rgba(0, 120, 212, 0.2);
  color: #0078D4;
}

.connected-account-info {
  flex: 1;
}

.connected-account-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.connected-account-status {
  font-size: 12px;
  color: #666;
}

.connected-account-status.connected {
  color: #3cfa7b;
}

/* Responsive Anpassungen */
@media (max-width: 1100px) {
  .profile-content {
    padding: 40px 40px;
  }
}

@media (max-width: 900px) {
  body.bg-auth {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .profile-layout {
    flex-direction: column;
    max-width: 100%;
  }

  .profile-sidebar {
    width: 100%;
    min-width: auto;
    border-radius: 16px 16px 0 0;
    border-right: 1px solid rgba(255, 102, 0, 0.25);
    border-bottom: none;
    padding: 28px 0;
  }

  .profile-sidebar::before {
    border-radius: 16px 16px 0 0;
  }

  .sidebar-brand {
    padding: 0 24px 24px;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
  }

  .sidebar-nav-item {
    padding: 10px 16px;
    border-left: none;
    border-radius: 8px;
    font-size: 13px;
    gap: 8px;
  }

  .sidebar-nav-item.active {
    border-left: none;
    background: rgba(255, 102, 0, 0.15);
  }

  .sidebar-nav-item svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-footer {
    padding: 12px 24px;
  }

  .profile-content {
    border-left: 1px solid rgba(255, 102, 0, 0.25);
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 32px 28px;
  }

  .profile-content::before {
    border-radius: 0 0 16px 16px;
  }

  .content-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
  }

  .content-title {
    font-size: 24px;
  }

  .info-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  body.bg-auth {
    padding: 12px;
  }

  .auth-card {
    padding: 40px 24px 32px;
    min-height: auto;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .auth-footer {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .profile-content {
    padding: 24px 20px;
  }

  .content-title {
    font-size: 22px;
  }

  .info-card {
    padding: 20px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .info-value {
    text-align: left;
  }

  .device-item,
  .connected-account {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
  }

  .device-current {
    align-self: flex-start;
  }

  .sidebar-nav {
    flex-direction: column;
    gap: 4px;
  }

  .sidebar-nav-item {
    width: 100%;
    border-radius: 0;
    border-left: 3px solid transparent;
  }

  .sidebar-nav-item.active {
    border-left-color: #ff6600;
  }
}
