/* Dracula Pro Theme - Resume Site */
/* Dark, professional palette with accent flares */

:root {
  /* Dracula Pro - Darker backgrounds */
  --bg-darker: #1e1f29;
  --bg-primary: #282a36;
  --bg-secondary: #44475a;
  --bg-elevated: #343746;

  /* Foreground */
  --fg-primary: #f8f8f2;
  --fg-secondary: #e0e0e0;
  --fg-muted: #6272a4;

  /* Accent colors */
  --accent-purple: #bd93f9;
  --accent-pink: #ff79c6;
  --accent-cyan: #8be9fd;
  --accent-green: #50fa7b;
  --accent-orange: #ffb86c;
  --accent-yellow: #f1fa8c;
  --accent-yellow-muted: rgba(241, 250, 140, 0.4);
  --accent-red: #ff5555;

  /* Functional */
  --border-subtle: rgba(189, 147, 249, 0.35);
  --border-accent: rgba(189, 147, 249, 0.55);
  --shadow-color: rgba(0, 0, 0, 0.3);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
  --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darker);
  color: var(--fg-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-pink);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg-primary);
}

.header-brand:hover {
  color: var(--accent-purple);
}

.brand-name {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
}

.nav-link {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  color: var(--fg-secondary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-cyan);
  background-color: rgba(139, 233, 253, 0.1);
}

.nav-link.active {
  color: var(--accent-purple);
  background-color: rgba(189, 147, 249, 0.15);
}

/* Header actions (sign-in + hamburger) */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Sign-in button */
.sign-in-btn {
  padding: var(--space-xs) var(--space-md);
  background-color: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.sign-in-btn:hover {
  background-color: var(--accent-cyan);
  color: var(--bg-darker);
}

/* Authenticated user display */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--accent-cyan);
}

.user-display {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  background-color: var(--accent-red);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-darker);
  cursor: pointer;
  font: inherit;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background-color: #ff6e6e;
  color: var(--bg-darker);
}

.logout-icon {
  width: 14px;
  height: 14px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--fg-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* Main Content */
.main {
  flex: 1;
  padding: var(--space-xl) var(--space-lg);
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* Page Title */
.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg-primary);
  margin-bottom: var(--space-sm);
}

.page-description {
  color: var(--fg-muted);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
}

/* Sections */
.section {
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.section-description {
  color: var(--fg-muted);
  margin-bottom: var(--space-lg);
}

/* Subsections (nested within sections) */
.subsection {
  margin-bottom: var(--space-xl);
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: var(--space-md);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--accent-purple);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.avatar-container {
  position: relative;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-purple);
  box-shadow: 0 0 20px rgba(189, 147, 249, 0.3);
}

.hero-name {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--fg-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.3rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.hero-company {
  color: var(--fg-muted);
  font-size: 1.1rem;
}

.hero-company a {
  color: var(--accent-green);
}

.hero-tagline {
  color: var(--fg-muted);
  font-style: italic;
  max-width: 600px;
}

/* Summary */
.summary-content {
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-purple);
}

.summary-content p {
  color: var(--fg-secondary);
  line-height: 1.8;
}

/* Generic Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
  border: 1px solid transparent;
  background: none;
  font-family: var(--font-sans);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-elevated);
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple);
}

.btn-secondary:hover {
  background-color: var(--accent-purple);
  color: var(--bg-darker);
}

/* Timeline Expand Button Container */
.timeline-expand {
  margin-top: var(--space-lg);
  text-align: center;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent-purple),
    var(--accent-cyan)
  );
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 4px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-purple);
  border: 2px solid var(--bg-darker);
  box-shadow: 0 0 10px rgba(189, 147, 249, 0.5);
}

.timeline-content {
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.timeline-title {
  font-size: 1.1rem;
  color: var(--fg-primary);
  font-weight: 600;
}

.timeline-date {
  color: var(--accent-orange);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.timeline-company {
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
}

.timeline-highlights {
  list-style: none;
  margin-top: var(--space-md);
}

.timeline-highlights li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--fg-secondary);
}

.timeline-highlights li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

/* Education Grid */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.education-card {
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
}

.education-card:hover {
  border-color: var(--accent-purple);
}

.education-degree {
  color: var(--fg-primary);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.education-field {
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
}

.education-institution {
  color: var(--fg-secondary);
}

.education-date {
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.education-highlights {
  list-style: none;
  margin-top: var(--space-md);
}

.education-highlights li {
  color: var(--accent-pink);
  font-size: 0.9rem;
}

/* Skills */
.skills-container {
  display: grid;
  gap: var(--space-xl);
}

.skill-category {
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.skill-category-title {
  color: var(--fg-primary);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  background-color: var(--bg-secondary);
  color: var(--fg-primary);
  border: 1px solid transparent;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

/* Skill levels */
.skill-tag.skill-expert {
  border-left: 3px solid var(--accent-green);
}

.skill-tag.skill-advanced {
  border-left: 3px solid var(--accent-cyan);
}

.skill-tag.skill-intermediate {
  border-left: 3px solid var(--accent-orange);
}

/* Certifications */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.cert-card {
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.cert-name {
  font-size: 1rem;
  color: var(--fg-primary);
  margin-bottom: var(--space-sm);
}

.cert-name a {
  color: var(--accent-cyan);
}

.cert-issuer {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.cert-date {
  color: var(--accent-orange);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.tool-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  transform: translateZ(0);
  will-change: transform, border-color;
}

.tool-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.tool-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 56px;
  margin-bottom: var(--space-md);
}

.tool-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.tool-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.tool-name {
  font-size: 1.1rem;
  color: var(--fg-primary);
  margin-bottom: var(--space-xs);
}

.tool-category {
  color: var(--accent-purple);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.tool-description {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tool-link {
  display: inline-block;
  margin-top: auto;
  padding-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--accent-cyan);
}

.tool-links {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-md);
}

.tool-links .tool-link {
  margin-top: 0;
  padding-top: 0;
}

.tool-links .tool-link-right:only-child,
.tool-links .tool-link:only-child:not(.tool-link-config) {
  margin-left: auto;
}

.tool-link-config {
  color: var(--accent-green);
}

.tool-link-right {
  margin-left: auto;
}

/* Homelab Services */
.homelab-section {
  background-color: var(--bg-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.homelab-badge {
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--accent-green);
  color: var(--bg-darker);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
}

/* Section Header with Filter */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-subtle);
  gap: var(--space-md);
}

.section-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex: 0 0 auto;
}

/* Filter Controls */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  flex: 0 0 auto;
}

.filter-controls label {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.category-dropdown {
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  color: var(--fg-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast);
  min-width: 160px;
}

.category-dropdown:hover {
  border-color: var(--accent-cyan);
  background-color: var(--bg-secondary);
}

.category-dropdown:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.category-dropdown option {
  background-color: var(--bg-darker);
  color: var(--fg-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background-color: var(--bg-elevated);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.service-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  margin-bottom: var(--space-sm);
}

.service-icon {
  font-size: 2rem;
}

.service-icon-img {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.service-name {
  color: var(--fg-primary);
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.service-category {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--accent-orange);
  color: var(--bg-darker);
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.service-description {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.service-link {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background-color: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.service-link:hover {
  background-color: var(--accent-cyan);
  color: var(--bg-darker);
}

.service-description {
  flex: 1;
}

.service-links {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--space-md);
}

.service-link-docs {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.service-link-docs:hover {
  background-color: var(--accent-green);
  color: var(--bg-darker);
}

.services-placeholder {
  text-align: center;
  padding: var(--space-xl);
  color: var(--fg-muted);
}

.services-hint {
  margin-top: var(--space-md);
  font-size: 0.9rem;
}

.services-hint code {
  background-color: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--accent-yellow);
}

/* Projects */
.commit-stats {
  text-align: center;
}

.stats-card {
  display: inline-block;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-elevated));
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-purple);
  box-shadow: 0 0 30px rgba(189, 147, 249, 0.2);
}

.stats-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.stats-label {
  color: var(--fg-primary);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.stats-description {
  color: var(--fg-muted);
  max-width: 500px;
  font-size: 0.95rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.project-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
}

.project-header {
  padding: var(--space-lg);
  padding-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.project-name {
  font-size: 1.1rem;
  color: var(--fg-primary);
}

.project-name a {
  color: var(--accent-cyan);
}

.project-language {
  padding: 2px 8px;
  background-color: var(--bg-secondary);
  color: var(--accent-yellow);
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.project-description {
  padding: var(--space-md) var(--space-lg);
  color: var(--fg-muted);
  font-size: 0.95rem;
  flex: 1;
}

.project-highlights {
  list-style: none;
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-md);
}

.project-highlights li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--fg-secondary);
  font-size: 0.9rem;
}

.project-highlights li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

.project-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.github-icon {
  opacity: 0.8;
}

/* Work Highlights */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.work-card {
  background-color: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-purple);
}

.work-name {
  color: var(--fg-primary);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.work-description {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.work-highlights {
  list-style: none;
}

.work-highlights li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--fg-secondary);
  font-size: 0.9rem;
}

.work-highlights li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent-orange);
  font-family: var(--font-mono);
}

/* Contact Section */
.contact-section {
  text-align: center;
  background-color: var(--bg-primary);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.contact-content p {
  color: var(--fg-muted);
  margin-bottom: var(--space-lg);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.contact-btn-primary {
  background-color: var(--accent-purple);
  color: var(--bg-darker);
}

.contact-btn-primary:hover {
  background-color: var(--accent-pink);
  color: var(--bg-darker);
  transform: translateY(-2px);
}

.contact-btn-secondary {
  background-color: transparent;
  border: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.contact-btn-secondary:hover {
  background-color: var(--accent-cyan);
  color: var(--bg-darker);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-xl) var(--space-lg);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--fg-secondary);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.social-link:hover {
  background-color: var(--accent-purple);
  color: var(--bg-darker);
  transform: translateY(-3px);
}

.social-icon {
  width: 20px;
  height: 20px;
}

.footer-text {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    flex-direction: column;
    align-items: stretch;
  }

  .header.nav-open .nav {
    max-height: 300px;
  }

  .header.nav-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .header.nav-open .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .header.nav-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-list {
    flex-direction: column;
    padding: var(--space-md);
  }

  .nav-link {
    display: block;
    padding: var(--space-md);
  }

  .hero-name {
    font-size: 2rem;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header .section-title {
    width: 100%;
  }

  .filter-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-controls label {
    display: none;
  }

  .category-dropdown {
    min-width: auto;
    flex: 1;
  }

  .timeline {
    padding-left: var(--space-lg);
  }

  .timeline-header {
    flex-direction: column;
  }

  .tools-grid,
  .projects-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .stats-number {
    font-size: 2.5rem;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeIn 0.5s ease-out;
}

/* Devices Page */
.devices-section {
  margin-bottom: var(--space-xl);
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.device-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    border-color var(--transition-normal),
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
  transform: translateZ(0);
  will-change: transform, border-color;
  min-height: 180px;
}

.device-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.device-card.device-on {
  border-color: var(--accent-pink);
  box-shadow: 0 0 20px rgba(255, 121, 198, 0.1);
}

.device-card.device-off {
  opacity: 0.7;
}

/* Spacer to push status/toggle to bottom of card */
.device-card-spacer {
  flex: 1;
  min-height: var(--space-sm);
}

.device-icon-container {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.device-icon {
  width: 40px;
  height: 40px;
  color: var(--fg-muted);
}

.device-on .device-icon {
  color: var(--accent-purple);
}

.device-icon svg {
  width: 100%;
  height: 100%;
}

/* Device name row - contains status dot + name inline (appliances only) */
.device-name-row {
  position: relative;
  margin-bottom: var(--space-xs);
  text-align: center;
}

/* Position status dot to the left, keep name centered */
.device-name-row .status-dot {
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Override service-name margin when inside device-name-row */
.device-name-row .service-name {
  margin: 0;
}

.device-type {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-transform: capitalize;
  margin-bottom: var(--space-sm);
}

.device-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

/* Status dots - colored indicators with tooltips */
.status-dot {
  display: inline-block;
  font-size: 0.8rem;
  line-height: 1;
  cursor: help;
  user-select: none;
  flex-shrink: 0;
}

.status-dot.state-on,
.status-dot.state-running,
.status-dot.state-washing,
.status-dot.state-drying {
  color: var(--accent-green);
}

.status-dot.state-off,
.status-dot.state-idle,
.status-dot.state-ready,
.status-dot.state-unknown {
  color: var(--fg-muted);
  opacity: 0.5;
}

.device-brightness {
  font-size: 0.75rem;
  color: var(--accent-yellow);
}

.device-ip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  margin-bottom: var(--space-xs);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.device-ip:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

/* Device category badge (matches service-category) */
.device-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background-color: var(--accent-orange);
  color: var(--bg-primary);
  margin-bottom: var(--space-sm);
}

/* Appliance-specific styling */
.appliance-status {
  margin-top: auto;
}

/* Device Toggle Switch */
.device-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  margin: var(--space-sm) 0;
}

.device-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.device-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.device-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--fg-muted);
  border-radius: 50%;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.device-toggle-input:checked + .device-toggle-slider {
  background-color: rgba(80, 250, 123, 0.2);
  border-color: var(--accent-green);
}

.device-toggle-input:checked + .device-toggle-slider::before {
  transform: translateX(24px);
  background-color: var(--accent-green);
}

.device-toggle-input:focus + .device-toggle-slider {
  box-shadow: 0 0 4px var(--accent-purple);
}

.device-toggle-input:disabled + .device-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Device toggle positioning in feature rows */
.feature-row .device-toggle {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

/* Brightness Control */
.brightness-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  width: 100%;
  margin: var(--space-xs) 0;
}

.brightness-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-orange);
  border-radius: 20px;
  outline: none;
  cursor: pointer;
  padding: 0 2px;
}

.brightness-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent-orange);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.brightness-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent-orange);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.brightness-value {
  font-size: 0.75rem;
  color: var(--accent-yellow);
  text-align: center;
}

/* Device Error Message */
.device-error {
  display: none;
  font-size: 0.7rem;
  color: var(--accent-red);
  margin-top: var(--space-xs);
  text-align: center;
}

.devices-placeholder {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  border: 1px dashed var(--border-subtle);
}

.devices-placeholder p {
  color: var(--fg-muted);
  margin-bottom: var(--space-sm);
}

.devices-hint {
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .devices-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
  }

  .device-card {
    padding: var(--space-md);
    min-height: 160px;
  }
}

/* Appliance Enrichment Styles */
.appliance-details {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.appliance-time {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-yellow);
  font-weight: 500;
}

.time-icon {
  font-size: 0.9rem;
}

.cycle-progress-container {
  position: relative;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.cycle-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.cycle-progress-text {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 0.7rem;
  color: var(--fg-muted);
}

.appliance-temp {
  display: flex;
  gap: var(--space-sm);
  color: var(--accent-cyan);
}

/* Fridge temps should stack vertically */
.fridge-temp {
  flex-direction: column;
  gap: 0.25rem;
}

.appliance-temp .temp-target {
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.burner-indicators {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
}

.burner {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burner .burner-icon {
  width: 28px;
  height: 28px;
}

.burner-on {
  color: var(--accent-pink);
}

.burner-off {
  color: var(--fg-muted);
  opacity: 0.5;
}

.door-status {
  font-size: 0.75rem;
}

.door-status.door-open {
  color: var(--accent-orange);
  font-weight: 500;
}

.tv-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.tv-info .tv-input-value,
.tv-info .tv-volume-value {
  color: var(--accent-cyan);
}

/* Uppercase only the TV input value, not the label */
.tv-info .tv-value {
  text-transform: uppercase;
}

/* Refresh Button */
.refresh-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  color: var(--accent-purple);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 500;
}

.refresh-btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-normal);
}

.refresh-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

.refresh-btn:active svg {
  transform: rotate(180deg);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.refresh-btn.refreshing svg {
  animation: spin 2s linear infinite;
}

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

/* Last Updated Indicator */
.last-updated {
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-style: italic;
}

.last-updated.stale {
  color: var(--accent-orange);
}

.last-updated.very-stale {
  color: var(--accent-red);
}

@media (max-width: 768px) {
  .refresh-btn {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-sm);
  }

  .refresh-btn svg {
    width: 16px;
    height: 16px;
  }

  .last-updated {
    font-size: 0.7rem;
  }
}

/* Page Header with Refresh Group */
.page-header-with-refresh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: 0;
}

.page-header-content {
  flex: 1;
  min-width: 0;
}

.page-header-content .page-description {
  margin-bottom: 0;
}

.refresh-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
  padding-right: var(--space-md);
}

/* Section Header with Filters on Right */
.section-header-left {
  flex: 1;
  min-width: 0;
}

.section-header {
  justify-content: space-between;
}

@media (max-width: 768px) {
  .page-header-with-refresh {
    flex-direction: column;
    align-items: flex-start;
  }

  .refresh-group {
    width: 100%;
    align-items: flex-start;
    padding-right: 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header-left {
    width: 100%;
  }

  .filter-controls {
    width: 100%;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  pointer-events: auto;
  min-width: 200px;
  text-align: center;
  font-size: 0.9rem;
}

.toast.toast-info {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.toast.toast-success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.toast.toast-error {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.toast.toast-hide {
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Control Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal-title-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-purple);
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.modal-close:hover {
  color: var(--accent-red);
  background-color: rgba(255, 85, 85, 0.1);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Control Groups */
.control-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.control-group + .control-group {
  margin-top: var(--space-lg);
}

.control-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

/* Power Control */
.power-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.power-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.power-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fg-muted);
}

.power-indicator.power-on {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* Local Control Status */
.local-control-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.local-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg-muted);
}

.local-status-indicator.connected {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.local-status-indicator.disconnected {
  background: var(--accent-yellow);
}

.local-status-label {
  font-size: var(--font-sm);
  color: var(--fg-muted);
}

.pair-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-sm);
  background: var(--bg-secondary);
  color: var(--fg-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pair-btn:hover {
  background: var(--accent-purple);
  color: var(--bg-darker);
  border-color: var(--accent-purple);
}

.pair-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.power-label {
  font-size: 0.9rem;
  color: var(--fg-primary);
}

.power-btn {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  background: var(--bg-secondary);
  color: var(--fg-primary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.power-btn:hover {
  background: var(--accent-purple);
  color: var(--bg-darker);
  border-color: var(--accent-purple);
}

.power-btn svg {
  width: 16px;
  height: 16px;
}

/* Volume Control */
.volume-control {
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.volume-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.volume-icon {
  color: var(--fg-muted);
  flex-shrink: 0;
}

.volume-icon svg {
  width: 20px;
  height: 20px;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-cyan);
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-cyan);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.volume-value {
  min-width: 36px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-cyan);
}

/* Mute Toggle */
.mute-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

.mute-label {
  font-size: 0.85rem;
  color: var(--fg-secondary);
}

.mute-toggle {
  position: relative;
  width: 44px;
  height: 22px;
}

.mute-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mute-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.mute-toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: var(--fg-muted);
  border-radius: 50%;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.mute-toggle input:checked + .mute-toggle-slider {
  background-color: rgba(255, 85, 85, 0.2);
  border-color: var(--accent-red);
}

.mute-toggle input:checked + .mute-toggle-slider::before {
  transform: translateX(22px);
  background-color: var(--accent-red);
}

/* Volume Arrows */
.volume-arrows-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

/* Mute section (label + toggle) */
.mute-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.mute-label-inline {
  font-size: 0.8rem;
  color: var(--fg-secondary);
}

/* Inline mute toggle (between volume buttons) */
.mute-toggle-inline {
  position: relative;
  width: 44px;
  height: 22px;
  flex-shrink: 0;
}

.mute-toggle-inline input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mute-toggle-inline .mute-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  width: 44px;
  height: 22px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.mute-toggle-inline .mute-toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: var(--fg-muted);
  border-radius: 50%;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.mute-toggle-inline input:checked + .mute-toggle-slider {
  background-color: rgba(255, 85, 85, 0.2);
  border-color: var(--accent-red);
}

.mute-toggle-inline input:checked + .mute-toggle-slider::before {
  transform: translateX(22px);
  background-color: var(--accent-red);
}

.volume-arrow-btn {
  flex: 1;
  height: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-arrow-btn:hover {
  background: var(--selection);
  border-color: var(--accent-cyan);
}

.volume-arrow-btn:active {
  transform: scale(0.95);
}

.volume-arrow-btn svg {
  width: 16px;
  height: 16px;
}

/* Input Source Control */
.input-control {
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.input-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.input-select:hover {
  border-color: var(--accent-cyan);
}

.input-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.input-select option {
  background: var(--bg-darker);
  color: var(--fg-primary);
}

/* D-pad Navigation */
.dpad-control {
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.dpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  max-width: 200px;
  margin: 0 auto;
}

.dpad-btn {
  padding: 0.6rem 0.3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dpad-btn:hover {
  background: var(--selection);
  border-color: var(--accent-cyan);
}

.dpad-btn:active {
  transform: scale(0.95);
}

.dpad-btn.dpad-arrow {
  font-size: 1rem;
}

.dpad-btn.dpad-select {
  background: var(--accent-cyan);
  color: var(--bg-darker);
  font-weight: 600;
}

.dpad-btn.dpad-select:hover {
  background: var(--accent-purple);
}

/* Keyboard Button (in nav section) */
.keyboard-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 200px;
  max-width: 200px;
  margin: var(--space-sm) auto 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 2px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.keyboard-btn svg {
  width: 18px;
  height: 18px;
}

.keyboard-btn:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: var(--bg-darker);
}

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

/* Dual Select Row (Picture/Sound modes) */
.dual-select-row {
  display: flex;
  gap: var(--space-sm);
}

.dual-select-row .input-select {
  flex: 1;
  min-width: 0;
}

/* Reset button focus state after click (prevent sticky pressed look) */
.dpad-btn:focus,
.media-btn:focus,
.channel-btn:focus,
.power-btn:focus,
.app-btn:focus,
.volume-arrow-btn:focus {
  outline: none;
}

.dpad-btn:focus:not(:active),
.media-btn:focus:not(:active),
.channel-btn:focus:not(:active),
.power-btn:focus:not(:active),
.app-btn:focus:not(:active),
.volume-arrow-btn:focus:not(:active) {
  background: var(--bg-secondary);
  transform: none;
}

/* Channel Control */
.channel-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.channel-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.channel-btn:hover {
  background: var(--selection);
  border-color: var(--accent-cyan);
}

.channel-btn:active {
  transform: scale(0.95);
}

.channel-input {
  width: 60px;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 1rem;
  text-align: center;
}

.channel-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.channel-input::placeholder {
  color: var(--fg-muted);
}

/* Media Controls */
.media-control {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.media-btn {
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--fg-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.media-btn:hover {
  background: var(--selection);
  border-color: var(--accent-cyan);
}

.media-btn:active {
  transform: scale(0.95);
}

/* Combined Media + Channel Control */
.media-channel-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.media-channel-control .media-control {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}

.channel-control-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  min-width: 24px;
  text-align: center;
}

/* Apps Grid */
.apps-control {
  background: var(--bg-elevated);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.app-btn {
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-btn:hover {
  background: var(--accent-cyan);
  color: var(--bg-darker);
  border-color: var(--accent-cyan);
}

.apps-loading,
.apps-empty,
.apps-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  padding: var(--space-md);
}

.apps-error {
  color: var(--accent-red);
}

/* Controllable device hover indicator */
.device-card.controllable {
  cursor: pointer;
}

.device-card.controllable:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(189, 147, 249, 0.15);
}

.device-card.controllable::after {
  content: "Tap to control";
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.65rem;
  color: var(--fg-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.device-card.controllable:hover::after {
  opacity: 1;
}

/* Modal loading state */
.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  gap: var(--space-md);
  color: var(--fg-muted);
}

.modal-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Modal error state */
.modal-error {
  text-align: center;
  padding: var(--space-lg);
  color: var(--accent-red);
}

@media (max-width: 480px) {
  .modal {
    width: 95%;
    max-height: 85vh;
  }

  .modal-body {
    padding: var(--space-md);
  }
}

/* ===== Refrigerator Modal Styles ===== */

/* Temperature Control */
.temp-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
}

.temp-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--fg-primary);
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.temp-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(139, 233, 253, 0.1);
}

.temp-btn:active {
  transform: scale(0.95);
}

.temp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.temp-btn-minus:hover {
  border-color: var(--accent-blue);
  background: rgba(98, 114, 164, 0.2);
}

.temp-btn-plus:hover {
  border-color: var(--accent-orange);
  background: rgba(255, 184, 108, 0.2);
}

.temp-display {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  min-width: 80px;
  justify-content: center;
}

.temp-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.temp-unit {
  font-size: 1.25rem;
  color: var(--fg-muted);
}

.temp-range-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: var(--space-xs);
}

/* Feature Toggles */
.feature-toggles {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: var(--space-xs) var(--space-md);
}

.feature-name {
  font-weight: 500;
  color: var(--fg-primary);
  grid-column: 1;
  grid-row: 1;
}

.feature-hint {
  font-size: 0.75rem;
  color: var(--fg-muted);
  grid-column: 1;
  grid-row: 2;
}

/* Fridge Status Display */
.fridge-status-group {
  margin-bottom: var(--space-sm);
}

.fridge-status-row {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
}

.fridge-door-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.fridge-door-status.door-open {
  background: rgba(255, 85, 85, 0.15);
  border-color: var(--accent-red);
}

.fridge-door-status.door-open .door-label {
  color: var(--accent-red);
  font-weight: 600;
}

.door-icon {
  font-size: 1.25rem;
}

.door-label {
  color: var(--fg-primary);
}

/* Responsive adjustments for refrigerator modal */
@media (max-width: 480px) {
  .temp-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .temp-value {
    font-size: 2rem;
  }

  .feature-row {
    padding: var(--space-xs) var(--space-sm);
  }

  .feature-toggle {
    width: 42px;
    height: 24px;
  }

  .feature-toggle-slider::before {
    height: 18px;
    width: 18px;
  }

  .feature-toggle input:checked + .feature-toggle-slider::before {
    transform: translateX(18px);
  }
}

/* ===== Washer Modal Styles ===== */

/* Remote Control Warning Banner */
.remote-control-warning {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  background: rgba(255, 184, 108, 0.15);
  border: 1px solid var(--accent-orange);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
}

.remote-control-warning .warning-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: var(--accent-orange);
}

.remote-control-warning .warning-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.remote-control-warning .warning-content strong {
  color: var(--accent-orange);
  font-weight: 600;
}

.remote-control-warning .warning-content span {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* Washer Status Display */
.washer-status-group {
  margin-bottom: var(--space-sm);
}

.washer-status-row {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
}

.washer-state-badge {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  text-transform: capitalize;
}

.washer-state-badge.state-running {
  background: rgba(80, 250, 123, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.washer-state-badge.state-paused {
  background: rgba(255, 184, 108, 0.15);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.washer-state-badge.state-stopped,
.washer-state-badge.state-idle {
  background: var(--bg-secondary);
  border-color: var(--border-subtle);
  color: var(--fg-muted);
}

/* Washer Progress Display */
.washer-progress-group {
  margin-bottom: var(--space-md);
}

.washer-progress-container {
  position: relative;
  width: 100%;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cycle-progress-bar-modal {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.3s ease;
}

.cycle-progress-text-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-primary);
}

.washer-time-remaining {
  margin-top: var(--space-xs);
  text-align: center;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* Washer Select Dropdowns */
.washer-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 0.9375rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236272a4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
}

.washer-select:hover:not(:disabled) {
  border-color: var(--accent-purple);
}

.washer-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.washer-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Washer Operation Buttons */
.washer-operation-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.washer-op-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.washer-op-btn svg {
  width: 16px;
  height: 16px;
}

.washer-op-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.washer-start-btn {
  background: var(--accent-green);
  color: var(--bg-darker);
}

.washer-start-btn:hover:not(:disabled) {
  background: var(--accent-green-hover, #6aff8f);
  transform: translateY(-1px);
}

.washer-pause-btn {
  background: var(--accent-orange);
  color: var(--bg-darker);
}

.washer-pause-btn:hover:not(:disabled) {
  background: var(--accent-orange-hover, #ffcc80);
  transform: translateY(-1px);
}

.washer-stop-btn {
  background: var(--accent-red);
  color: var(--bg-darker);
}

.washer-stop-btn:hover:not(:disabled) {
  background: var(--accent-red-hover, #ff7777);
  transform: translateY(-1px);
}

/* Responsive adjustments for washer modal */
@media (max-width: 480px) {
  .washer-operation-buttons {
    flex-direction: column;
  }

  .washer-op-btn {
    justify-content: center;
  }

  .remote-control-warning {
    padding: var(--space-sm);
  }

  .remote-control-warning .warning-icon {
    width: 20px;
    height: 20px;
  }
}

/* ===== Dryer Modal Styles ===== */
/* Dryer uses similar styles to washer - aliasing selectors */

.dryer-status-group { margin-bottom: var(--space-sm); }
.dryer-status-row { display: flex; justify-content: center; padding: var(--space-sm) 0; }

.dryer-state-badge {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  text-transform: capitalize;
}

.dryer-state-badge.state-running {
  background: rgba(80, 250, 123, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.dryer-state-badge.state-paused {
  background: rgba(255, 184, 108, 0.15);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.dryer-state-badge.state-stopped,
.dryer-state-badge.state-idle {
  background: var(--bg-secondary);
  border-color: var(--border-subtle);
  color: var(--fg-muted);
}

.dryer-progress-group { margin-bottom: var(--space-md); }

.dryer-progress-container {
  position: relative;
  width: 100%;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dryer-time-remaining {
  margin-top: var(--space-xs);
  text-align: center;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* Dryer select uses same styles as washer */
.dryer-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 0.9375rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236272a4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
}

.dryer-select:hover:not(:disabled) { border-color: var(--accent-purple); }
.dryer-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}
.dryer-select:disabled { opacity: 0.5; cursor: not-allowed; }

/* Dryer operation buttons */
.dryer-operation-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.dryer-op-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dryer-op-btn svg { width: 16px; height: 16px; }
.dryer-op-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dryer-start-btn { background: var(--accent-green); color: var(--bg-darker); }
.dryer-start-btn:hover:not(:disabled) { background: var(--accent-green-hover, #6aff8f); transform: translateY(-1px); }

.dryer-pause-btn { background: var(--accent-orange); color: var(--bg-darker); }
.dryer-pause-btn:hover:not(:disabled) { background: var(--accent-orange-hover, #ffcc80); transform: translateY(-1px); }

.dryer-stop-btn { background: var(--accent-red); color: var(--bg-darker); }
.dryer-stop-btn:hover:not(:disabled) { background: var(--accent-red-hover, #ff7777); transform: translateY(-1px); }

@media (max-width: 480px) {
  .dryer-operation-buttons { flex-direction: column; }
  .dryer-op-btn { justify-content: center; }
}

/* ===== Dishwasher Modal Styles ===== */
/* Shared styles for appliance modals */
.appliance-status-section {
  margin-bottom: var(--space-md);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.status-row:last-child {
  border-bottom: none;
}

.status-label {
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.status-value {
  font-weight: 500;
  color: var(--fg-primary);
}

.status-value.state-running {
  color: var(--accent-green);
}

.status-value.state-paused {
  color: var(--accent-orange);
}

.status-value.state-idle,
.status-value.state-stop {
  color: var(--fg-muted);
}

.appliance-progress-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.progress-bar-container {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-cyan);
  min-width: 40px;
}

.appliance-controls-section {
  margin-bottom: var(--space-md);
}

.appliance-controls-section h3 {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.control-row {
  margin-bottom: var(--space-md);
}

.control-row label {
  display: block;
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: var(--space-xs);
}

.control-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 0.9375rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236272a4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
}

.control-select:hover:not(:disabled) {
  border-color: var(--accent-purple);
}

.control-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.control-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Temperature input group for oven controls */
.temp-input-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.temp-input-group input[type="number"] {
  width: 80px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 0.9375rem;
  text-align: center;
}

.temp-input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.temp-input-group input[type="number"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-secondary);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.temp-input-group .temp-unit {
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.temp-input-group .set-temp-btn {
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-purple);
  color: var(--bg-darker);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.temp-input-group .set-temp-btn:hover:not(:disabled) {
  background: var(--accent-purple-hover, #d0a0ff);
}

.temp-input-group .set-temp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.operation-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn svg {
  width: 16px;
  height: 16px;
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.start-btn {
  background: var(--accent-green);
  color: var(--bg-darker);
}

.start-btn:hover:not(:disabled) {
  background: var(--accent-green-hover, #6aff8f);
  transform: translateY(-1px);
}

.pause-btn {
  background: var(--accent-orange);
  color: var(--bg-darker);
}

.pause-btn:hover:not(:disabled) {
  background: var(--accent-orange-hover, #ffcc80);
  transform: translateY(-1px);
}

.stop-btn {
  background: var(--accent-red);
  color: var(--bg-darker);
}

.stop-btn:hover:not(:disabled) {
  background: var(--accent-red-hover, #ff7777);
  transform: translateY(-1px);
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-row label {
  margin-bottom: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  transition: var(--transition-fast);
  border-radius: 26px;
  border: 1px solid var(--border-subtle);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: var(--fg-muted);
  transition: var(--transition-fast);
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background-color: var(--bg-darker);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.appliance-metadata-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.appliance-metadata-section h3 {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metadata-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.metadata-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-primary);
}

@media (max-width: 480px) {
  .operation-buttons {
    flex-direction: column;
  }

  .control-btn {
    justify-content: center;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Channel Input - Hide Browser Spinners ===== */
.channel-input {
  -moz-appearance: textfield;
}
.channel-input::-webkit-outer-spin-button,
.channel-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== TV Keyboard Modal ===== */

.tv-text-input-group {
  display: flex;
  gap: var(--space-sm);
}

.tv-text-input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--fg-primary);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.tv-text-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.tv-text-input::placeholder {
  color: var(--fg-muted);
}

.tv-send-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-purple);
  color: var(--bg-darker);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
}

.tv-send-btn:hover {
  background: var(--accent-pink);
}

.tv-send-btn:active {
  transform: scale(0.97);
}

.tv-quick-search-grid,
.tv-special-keys-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.tv-quick-btn,
.tv-key-btn {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.tv-quick-btn:hover,
.tv-key-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-cyan);
}

.tv-quick-btn:active,
.tv-key-btn:active {
  transform: scale(0.97);
}

.tv-keyboard-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg-muted);
}

.status-indicator.connected {
  background: var(--accent-green);
}

.status-indicator.disconnected {
  background: var(--accent-red);
}

.status-text {
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

@media (max-width: 480px) {
  .tv-quick-search-grid,
  .tv-special-keys-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
