:root {
  --color-brand-bg: #f5fbff;
  --color-brand-dark: #0f394c;
  --color-brand-primary: #49b5e7;
  --color-brand-white: #fff;
}

p {
    margin-bottom: 0;
}

.content {
    position: relative;
    background-color: var(--color-brand-bg);
}

.content .container.app {
  max-width: 750px;
  width: 100%;
  padding: 2rem;
}

.container.app .card {
  background-color: white;
  padding: 2rem;
  border-radius: 1.5rem;
  shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(73, 181, 231, 0.1);
  text-align: center;
}

@media (min-width: 640px) {
  .content .container.app .card {
    padding: 2rem;
    border-radius: 1.875rem;
  }
}

.welcome-icon {
  width: 5rem;
  height: 5rem;
  background-color: rgba(73, 181, 231, 0.1);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}

.welcome-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-brand-primary);
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.description {
  color: rgba(15, 57, 76, 0.6);
  margin-bottom: 2rem;
  font-size: 1.125rem;
  line-height: 1.625;
}

.label-caps {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(15, 57, 76, 0.4);
  margin-bottom: 0.75rem;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.btn-difficulty {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.2s;
  border: 2px solid rgba(73, 181, 231, 0.1);
  background-color: white;
  color: rgba(15, 57, 76, 0.4);
  cursor: pointer;
}

.btn-difficulty:hover {
  border-color: rgba(73, 181, 231, 0.3);
}

.btn-difficulty.active {
  background-color: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  padding: 1rem;
  background-color: var(--color-brand-bg);
  border-radius: 0.75rem;
  border: 1px solid rgba(73, 181, 231, 0.05);
}

.step-num {
  color: var(--color-brand-primary);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.step-title {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step-desc {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  opacity: 0.6;
}

.btn-start {
  width: 100%;
  padding: 1rem 3rem;
  background-color: var(--color-brand-dark);
  color: white;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .btn-start {
    width: auto;
    display: inline-flex;
  }
}

.btn-start:hover {
  background-color: var(--color-brand-primary);
  box-shadow: 0 10px 15px -3px rgba(73, 181, 231, 0.25);
}

.btn-start svg {
  transition: transform 0.3s;
}

.btn-start:hover svg {
  transform: translateX(4px);
}

.note {
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: rgba(15, 57, 76, 0.4);
  font-style: italic;
}

/* Audio toggle */
.audio-toggle {
  position: fixed;
  top: 8.5rem;
  right: 1.5rem;
  padding: 0.75rem;
  background-color: white;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(15, 57, 76, 0.6);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-toggle:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: var(--color-brand-primary);
}

/* Test layout */
.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.plate-badge {
  padding: 0.25rem 0.75rem;
  background-color: rgba(73, 181, 231, 0.1);
  color: var(--color-brand-primary);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-reset {
  padding: 0.5rem;
  background: none;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  color: rgba(15, 57, 76, 0.4);
  transition: all 0.2s;
  display: flex;
}

.btn-reset:hover {
  background-color: var(--color-brand-bg);
  color: var(--color-brand-dark);
}

.test-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .test-content {
    flex-direction: row;
    text-align: left;
  }
}

.plate-container {
  flex-shrink: 0;
  position: relative;
  width: 300px;
  height: 300px;
  background-color: white;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  border: 8px solid rgba(73, 181, 231, 0.2);
  overflow: hidden;
}

.test-options-area {
  flex: 1;
  width: 100%;
}

.options-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.options-desc {
  color: rgba(15, 57, 76, 0.5);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-option {
  padding: 1rem;
  background-color: var(--color-brand-bg);
  border: 2px solid transparent;
  border-radius: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-brand-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-option:hover {
  border-color: rgba(73, 181, 231, 0.3);
  background-color: rgba(73, 181, 231, 0.05);
}

.btn-none {
  grid-column: span 2;
  font-size: 1.125rem;
  font-weight: 500;
  color: rgba(15, 57, 76, 0.6);
}

.btn-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(15, 57, 76, 0.4);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-help:hover {
  color: var(--color-brand-primary);
}

.help-text {
  margin-top: 1rem;
  padding: 1rem;
  background-color: rgba(73, 181, 231, 0.05);
  border-radius: 1rem;
  border: 1px solid rgba(73, 181, 231, 0.1);
  font-size: 0.875rem;
  color: rgba(15, 57, 76, 0.7);
  font-style: italic;
  display: none;
}

.progress-bar-container {
  margin-top: 2.5rem;
  height: 0.5rem;
  background-color: var(--color-brand-bg);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--color-brand-primary);
  width: 0%;
  transition: width 0.3s ease;
}

/* Results styles */
.results-icon {
  width: 5rem;
  height: 5rem;
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}

.results-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: #10b981;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  padding: 1.5rem;
  background-color: var(--color-brand-bg);
  border-radius: 1.875rem;
  border: 1px solid rgba(73, 181, 231, 0.05);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.stat-value.primary { color: var(--color-brand-primary); }

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.4;
}

.analysis-section {
  text-align: left;
  margin-bottom: 2.5rem;
}

.analysis-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.analysis-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-brand-primary);
}

.alert-box {
  padding: 1rem;
  border-radius: 1rem;
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.alert-success {
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #065f46;
}

.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

.issue-list {
  margin-top: 0.75rem;
  list-style: none;
}

.issue-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.dot {
  width: 6px;
  height: 6px;
  background-color: #f59e0b;
  border-radius: 50%;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.analytics-card {
  padding: 0.75rem;
  background-color: var(--color-brand-bg);
  border-radius: 1.25rem;
  border: 1px solid rgba(73, 181, 231, 0.05);
  text-align: center;
}

.analytics-val {
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--color-brand-primary);
}

.summary-box {
  padding: 1rem;
  background-color: rgba(73, 181, 231, 0.05);
  border-radius: 1rem;
  border: 1px solid rgba(73, 181, 231, 0.1);
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-style: italic;
  color: rgba(15, 57, 76, 0.7);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  background-color: var(--color-brand-bg);
  border-radius: 0.75rem;
  font-size: 0.75rem;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .actions {
    flex-direction: row;
  }
}

.btn-secondary {
  flex: 1;
  padding: 1rem;
  background-color: var(--color-brand-bg);
  border-radius: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: rgba(73, 181, 231, 0.1);
}

.footer-branding {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(15, 57, 76, 0.5);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.footer-dot {
  width: 4px;
  height: 4px;
  background-color: var(--color-brand-primary);
  border-radius: 50%;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

@media (max-width: 500px) {
    .content .container.app {
        padding: 0;
    }
    
    #welcome-screen, #test-screen, #results-screen {
        border-radius: 0;
    }
    
    .footer-branding {
        padding: 20px 0;
        margin: 0;
    }
}

@media (max-width: 1199px) {
    .audio-toggle {
        top: 6.5rem;
    }
}