/* Perplexity AI Dark Theme - Release Selector */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark theme colors inspired by Perplexity AI */
  --bg-primary: #0F0F0F;
  --bg-secondary: #1A1A1A;
  --bg-tertiary: #2A2A2A;
  --bg-hover: #333333;
  --bg-input: #1E1E1E;
  
  --text-primary: #FFFFFF;
  --text-secondary: #B4B4B4;
  --text-tertiary: #808080;
  --text-muted: #666666;
  
  --accent-primary: #20B2AA;
  --accent-hover: #1A9B94;
  --accent-active: #158A83;
  
  --border-primary: #333333;
  --border-secondary: #2A2A2A;
  --border-hover: #444444;
  
  --error-color: #FF6B6B;
  --success-color: #20B2AA;
  --warning-color: #FFB347;
  
  --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.6);
  
  --radius-small: 6px;
  --radius-medium: 8px;
  --radius-large: 12px;
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base HTML and Body */
html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-primary);
}

.app-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Checkbox Styles */

/* Checkbox Styles */
.checkbox-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.checkbox-container input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.checkmark {
  position: relative;
  width: 20px;
  height: 20px;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-small);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--text-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
  transform: rotate(45deg) scale(1);
}



.mobile-checkbox {
  justify-content: flex-end;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-medium);
  transition: var(--transition);
  margin-left: auto;
  width: auto;
}



.checkbox-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.mobile-checkbox .checkbox-label {
  color: var(--text-primary);
}

/* Release Item Base Styles - Non-selected states */
.release-item,
.release-item:active,
.release-item:focus,
.release-item.active,
.release-item[data-selected="true"],
.release-item[aria-selected="true"],
.release-item.highlighted,
.release-item.chosen {
  background: var(--bg-secondary) !important;
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-secondary) !important;
  transform: none !important; /* Ensure no transform on any state */
  box-shadow: var(--shadow-small) !important; /* Keep the default card shadow */
  /* Disable background color transitions to prevent flashing */
  /* Keep other transitions for things like border-color if they were intended */
  transition: border-color 0.2s ease, color 0.2s ease !important; 
}

/* Selected Release Item Styles - Override for selected state */
.release-item.selected {
    background: var(--bg-tertiary) !important; /* Dark gray for selected items */
    background-color: var(--bg-tertiary) !important; /* Dark gray for selected items */
    /* Rounded corners are inherited from .release-item */
    /* If selected items should have a different border color, you can add it here */
    /* e.g., border-color: var(--border-selected-color); */
}

/* Remove all hover-specific styles that might cause movement or visual change */
.release-item:hover,
.release-item:active:hover,
.release-item:focus:hover,
.release-item.active:hover {
  /* Explicitly set hover state to be identical to normal state */
  background: var(--bg-secondary) !important;
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-secondary) !important;
  transform: none !important;
  box-shadow: var(--shadow-small) !important;
}

/* Selected items should maintain their selected appearance even on hover */
.release-item.selected:hover {
  background: var(--bg-tertiary) !important;
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-secondary) !important;
  transform: none !important;
  box-shadow: var(--shadow-small) !important;
}


/* Error Card */
.error-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-medium);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-small);
}

.error-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-icon {
  font-size: 1.25rem;
  color: var(--warning-color);
}

.error-text {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-primary);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-state p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Telegram Access Control Messages */
.telegram-only-message {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-large);
  padding: 32px;
  margin: 24px 0;
  text-align: center;
  box-shadow: var(--shadow-small);
}

.telegram-content {
  max-width: 500px;
  margin: 0 auto;
}

.telegram-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.8;
}

.telegram-only-message h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}

.telegram-only-message p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.telegram-instructions {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-medium);
  padding: 20px;
  text-align: left;
}

.telegram-instructions p {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 12px;
}

.telegram-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.telegram-instructions li {
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9rem;
}

.telegram-instructions li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Web Access Notice */
.web-access-notice {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-medium);
  padding: 16px 20px;
  margin: 16px 0;
  box-shadow: var(--shadow-small);
}

.web-notice-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.web-notice-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.web-notice-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

/* Releases Container */
.releases-container {
  background: transparent; /* Changed from var(--bg-secondary) to transparent */
  border-radius: var(--radius-large);
  overflow: visible; /* Changed from hidden to visible for individual cards */
  box-shadow: none; /* Remove container shadow since individual cards will have shadows */
}

.releases-header {
  background: var(--bg-tertiary);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-primary);
  width: 100%;
  box-sizing: border-box;
}

/* Sort Container - positioned above ACTION column */
.sort-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 100px;
  gap: 12px;
  align-items: center;
  padding: 14px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  box-sizing: border-box;
  margin-bottom: 4px;
}

.sort-container > *:not(:last-child) {
  visibility: hidden; /* Hide content in first 5 columns */
}

/* Mobile Sort Controls Section - Centered in dedicated space */
.sort-controls-mobile {
  display: none; /* Hidden by default on all screens */
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  margin: 16px 0 24px 0;
  background: transparent;
}

/* Hide sort controls when no-url-message is visible */
.empty-state:not([style*="display: none"]) ~ .sort-controls-mobile,
.empty-state:not([style*="display: none"]) ~ .desktop-sort-wrapper {
  display: none !important;
}

/* Desktop Sort Wrapper - Above the grey container */
.desktop-sort-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  margin: 0 0 16px 0;
  background: transparent;
  position: relative;
  z-index: 10;
}

/* Desktop Sort Controls - Above ACTION column (legacy - keeping for compatibility) */
.desktop-sort-container {
  display: none; /* No longer needed */
}

.action-header-text {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  text-align: center;
}

.desktop-sort-dropdown {
  position: relative;
}

.desktop-sort-button {
  padding: 6px 12px;
  height: 32px;
  font-size: 0.75rem;
  border-radius: 8px;
  background: rgba(42, 42, 42, 0.85);
  border: 1px solid rgba(68, 68, 68, 0.7);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 0;
}



.desktop-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  margin-top: 0;
  min-width: 200px;
  z-index: 1000;
  transform-origin: top right;
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-dropdown.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Desktop Header Grid - Default display */
.header-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 100px;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 100%;
  box-sizing: border-box;
}

.header-grid span:nth-child(1) {
  text-align: left;
}

.header-grid span:nth-child(2),
.header-grid span:nth-child(3),
.header-grid span:nth-child(4),
.header-grid span:nth-child(5) {
  text-align: center;
}

.header-grid span:nth-child(6) {
  text-align: center;
}

.releases-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px; /* Reduced spacing between individual release cards from 16px to 8px */
  padding: 0; /* Remove any padding from the list itself */
}

/* Release Item - Individual Cards */
.release-item {
  background: var(--bg-secondary); /* Each release gets its own grey background */
  border-radius: var(--radius-medium); /* Rounded corners for card appearance */
  padding: 20px 24px;
  /* transition: var(--transition); REMOVE general transition that might affect transform */
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease; /* More specific transitions */
  position: relative;
  box-sizing: border-box;
  box-shadow: var(--shadow-small); /* Individual card shadow */
  border: 1px solid var(--border-secondary); /* Subtle border for definition */
  /* Ensure no transform is applied by default */
  transform: none;
}

/* Remove all separator styling since we now have individual cards */
.release-item:not(:last-child)::after {
  display: none; /* Remove separator - no longer needed */
}

/* Remove spacing between items since gap handles it */
.release-item + .release-item {
  margin-top: 0; /* Remove margin since gap handles spacing */
}

/* All hover effects removed for release items */

/* Desktop Grid Layout - Default display */
.release-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 100px;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.release-title {
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
  text-align: left;
}

.release-size {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  text-align: center;
}

.release-age {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  text-align: center;
}

.release-resolution {
  text-align: center;
}

.release-resolution .resolution-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-radius: var(--radius-small);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.release-languages {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.action-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  padding-right: 8px;
}

/* Buttons */
.btn-select {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-medium); /* This should provide rounded vertices */
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  /* transition: var(--transition); Replaced with specific transitions */
  transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  -webkit-tap-highlight-color: rgba(0,0,0,0); /* Remove tap highlight on mobile */
}

/* All hover effects removed for buttons */

.btn-select:active:not(:disabled) {
  transform: translateY(0);
  background-color: var(--bg-tertiary) !important; /* Changed to dark gray, forced */
  color: var(--text-primary) !important; /* Ensure text is visible, forced */
  box-shadow: none !important; /* Remove any active state shadow, forced */
  border-radius: var(--radius-medium) !important; /* Ensure rounded corners are maintained, forced */
}

.btn-select:disabled,
.btn-select.btn-disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Button Loading State */
.btn-select.loading {
  background: var(--accent-primary);
  color: transparent;
  cursor: not-allowed;
  position: relative;
  min-width: 70px;
  min-height: 36px;
}

.btn-select.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--bg-primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-mobile {
  width: 100%;
  margin-top: 0;
  min-height: 44px;
  font-size: 0.9rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-tertiary);
}

/* Success Message */
.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  z-index: 1000;
  font-weight: 500;
  max-width: 300px;
  word-wrap: break-word;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  opacity: 1;
}

.success-message.hidden {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.success-message.error {
  background: var(--error-color);
}

.success-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Mobile responsive success message */
@media (max-width: 768px) {
  .success-message {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    text-align: center;
  }
  
  /* Mobile search controls */
  .search-controls {
    padding: 16px;
    margin: 0 -16px 16px -16px;
  }
  
  .search-input-wrapper {
    max-width: none;
  }
  
  .search-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 16px;
    padding-right: 45px;
  }
  
  .clear-search-btn {
    right: 12px;
    width: 28px;
    height: 28px;
  }
  
  .clear-search-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .search-results-count {
    font-size: 0.8rem;
    padding: 6px 0;
  }
  
  /* Mobile search highlighting - slightly larger for touch */
  .search-highlight {
    padding: 2px 4px;
    font-weight: 600;
  }
}

/* Sort Controls */
.sort-dropdown {
  position: relative;
}

.sort-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid rgba(68, 68, 68, 0.6);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 100px;
  height: 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}



.sort-button.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

.sort-icon {
  flex-shrink: 0;
}

.sort-text {
  flex: 1;
  text-align: left;
}

.dropdown-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

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

.sort-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(42, 42, 42, 0.95);
  border: 1px solid rgba(68, 68, 68, 0.8);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 180px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 8px;
  backdrop-filter: blur(15px);
}

.sort-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-secondary);
}

.sort-option:last-child {
  border-bottom: none;
}



.sort-option.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.sort-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sort-option.active .sort-indicator {
  opacity: 1;
}

/* Search Controls - Beautiful search bar for both desktop and mobile */
.search-controls {
  display: none; /* Hidden by default, shown when releases are available */
  margin: 20px 0 16px 0;
  padding: 0;
}

.search-container {
  max-width: 100%;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-medium);
  padding: 0;
  transition: var(--transition);
  box-shadow: var(--shadow-small);
}

.search-input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-family);
  border-radius: var(--radius-medium);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-small);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}



.search-results-count {
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.search-results-count.no-results {
  color: var(--warning-color);
}

.search-results-count.has-results {
  color: var(--accent-primary);
}

/* Hide search controls when no releases or no URL */
.empty-state:not([style*="display: none"]) ~ .search-controls,
.loading-state:not([style*="display: none"]) ~ .search-controls {
  display: none !important;
}

/* Search highlighting styles */
.search-highlight {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  padding: 1px 3px;
  border-radius: var(--radius-small);
  font-weight: 500;
  transition: var(--transition);
}

/* Light theme search highlighting */
[data-color-scheme="light"] .search-highlight {
  background-color: #20B2AA;
  color: #FFFFFF;
}

/* Telegram WebApp theme overrides for search highlighting */
.telegram-webapp .search-highlight {
  background-color: var(--tg-theme-accent-text-color, var(--accent-primary));
  color: var(--tg-theme-bg-color, var(--bg-primary));
}

/* Mobile Layout Styles - Missing styles that were referenced in HTML */
.mobile-layout {
  display: none; /* Hidden by default, shown only on mobile */
}

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

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

.mobile-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  width: 80px;
}

.mobile-action {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0; /* ELIMINATED - was 2px 0 */
  margin: 0; /* ELIMINATED - was 2px */
  border-top: none; /* ELIMINATED - remove border that creates visual gap */
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  /* Container padding adjustment for mobile */
  .container {
    padding: 16px;
  }
  
  /* App header mobile styling */
  .app-header {
    padding: 24px 0;
    margin-bottom: 24px;
  }
  
  .app-header h1 {
    font-size: 2rem;
  }
  
  /* Hide desktop header grid on mobile */
  .releases-header {
    display: none !important;
  }
  
  /* Hide desktop grid layout on mobile */
  .release-grid {
    display: none !important;
  }
  
  /* Show mobile layout on small screens */
  .mobile-layout {
    display: block !important;
    padding: 16px 0;
  }
  
  /* Mobile layout row styling */
  .mobile-row {
    padding: 8px 0; /* Reduced padding for tighter layout */
    min-height: 32px; /* Reduced from 36px to 32px */
  }
  
  /* Last mobile row (language) - ELIMINATE bottom spacing completely */
  .mobile-row:last-of-type {
    padding-bottom: 0; /* ELIMINATED - was 4px */
    margin-bottom: 0; /* ELIMINATED - ensure no margin */
  }
  
  .mobile-label {
    width: 90px;
    font-size: 0.75rem;
  }
  
  /* Mobile resolution badge - remove bold styling */
  .mobile-layout .resolution-badge,
  .mobile-layout .mobile-row .resolution-badge,
  .release-item .mobile-layout .resolution-badge,
  .release-item .mobile-layout .mobile-row .resolution-badge {
    font-weight: 400 !important; /* Remove bold styling in mobile view */
    font-size: 0.7rem;
    padding: 3px 6px;
  }
  
  /* Mobile release title styling */
  .mobile-layout .release-title {
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: right;
    flex: 1;
    margin-left: 12px;
  }
  
  /* Mobile data styling */
  .mobile-layout .release-size,
  .mobile-layout .release-age,
  .mobile-layout .release-languages {
    font-size: 0.85rem;
    text-align: right;
    flex: 1;
    margin-left: 12px;
  }
  
  /* Mobile checkbox styling */
  .mobile-checkbox {
    justify-content: center;
    width: 100%;
    margin-top: 12px; /* Add some space from language row but eliminate the gap from container */
  }
  
  /* Mobile sort controls display */
  .sort-controls-mobile {
    display: flex !important;
  }
  
  /* Hide desktop sort controls on mobile */
  .desktop-sort-wrapper {
    display: none !important;
  }
  
  /* Mobile sort button styling */
  .mobile-sort-button {
    width: 140px;
    height: 44px;
    font-size: 0.9rem;
    padding: 12px 20px;
  }
  
  /* Mobile dropdown positioning */
  .mobile-dropdown {
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    margin-top: 8px;
    min-width: 160px;
  }
  
  .mobile-dropdown.show {
    transform: translateX(-50%) translateY(0);
  }
  
  /* Mobile release item spacing */
  .release-item {
    padding: 16px 16px; /* Add horizontal padding for mobile cards */
    margin: 0; /* Remove horizontal margin since we want full-width cards */
    border-radius: var(--radius-medium); /* Maintain card appearance on mobile */
    background: var(--bg-secondary); /* Ensure mobile cards have grey background */
    box-shadow: var(--shadow-small); /* Individual card shadows on mobile */
    /* Ensure no transform is applied in mobile view either */
    transform: none !important;
  }
  
  /* Remove mobile separator styling - no longer needed with individual cards */
  .release-item:not(:last-child)::after {
    display: none; /* Remove separator */
  }
  
  /* Mobile hover effects removed */
  
  /* Mobile gap between cards */
  .releases-list {
    gap: 12px; /* Slightly smaller gap for mobile */
  }
  
  /* Success message mobile adjustment already handled above */
}
