:root {
    --primary-color: #F0F0F0;
    --background-light: #FFF;
    --background-dark: #181818;
    --text-light: #333;
    --text-dark: #F5F5F5;
    --border-light: #E5E7EB;
    --border-dark: #374151;
    --header-light: #F0F0F0;
    --header-dark: #1F1F1F;
    --accent-color: #1E40AF;
    --highlight-included: rgba(0, 207, 0, 0.3);
    --highlight-excluded: rgba(255, 0, 0, 0.3);

    /* Dynamic variables that change based on theme */
    --text-primary: var(--text-light);
    --text-secondary: #6B7280;
    --background-primary: var(--background-light);
    --background-secondary: #F9FAFB;
    --border-primary: var(--border-light);
    --surface-color: #FFF;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --text-primary: var(--text-dark);
      --text-secondary: #9CA3AF;
      --background-primary: var(--background-dark);
      --background-secondary: #1F1F1F;
      --border-primary: var(--border-dark);
      --surface-color: #242424;
    }
  }

  html,
  body {
    height: 100%;
    margin: 0;
    padding: 0;
    /*overflow: hidden;*/
  }

  body {
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  .app-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0.5rem 1rem;
    /*overflow: hidden;*/
  }

  .main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /*overflow: hidden;*/
  }

  header {
    background: rgba(240, 240, 240, 0.8); /* Slightly transparent light background */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    padding: 0.3rem 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5); /* Subtle border with transparency */
    transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
  }

  .announcement-banner {
    background: #d3ffcd;
    color: #000;
    padding: 0.5rem 1rem;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .announcement-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
  }

  .announcement-icon {
    fill: currentColor;
    flex-shrink: 0;
  }

  .announcement-banner button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #000;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
  }

  .announcement-banner button:hover {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .ad-banner {
    background: #E6F3FF;
    color: #1E40AF;
    padding: 0.5rem 1rem;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
  }

  .ad-banner button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #1E40AF;
  }

  @media (prefers-color-scheme: dark) {
    .split-panel {
      background-color: #242424;
      border-color: var(--border-dark);
    }
    body {
      background: var(--background-dark);
      color: var(--text-dark);
    }

    header {
      background: rgba(31, 31, 31, 0.8); /* Slightly transparent dark background */
      border-bottom: 1px solid rgba(55, 65, 81, 0.5); /* Adjusted for dark theme */
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow in dark mode */
    }

    /* Citations table header dark mode */
    .quote-table th {
      background: #1F1F1F !important;
      color: var(--text-dark) !important;
      border-color: var(--border-dark) !important;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    /* Citations search row dark mode */
    #citations-search-row td {
      background: #1F1F1F !important;
      border-color: var(--border-dark) !important;
    }

    /* Search input dark mode */
    #citations-search-input {
      background: #242424 !important;
      color: var(--text-dark) !important;
      border-color: var(--border-dark) !important;
    }

    #citations-search-input::placeholder {
      color: #6B7280 !important;
    }

    #citations-search-input:focus {
      border-color: #3B82F6 !important;
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    }

    /* Panel header dark mode */
    #panel-header {
      background: #1F1F1F !important;
      border-color: var(--border-dark) !important;
    }

    /* Panel tab selector dark mode */
    #panel-tab-selector {
      background: #1F1F1F !important;
      border-color: var(--border-dark) !important;
    }

    /* Word count details container dark mode */
    #word-count-details-container,
    #word-count-details-container-mobile {
      background: #242424 !important;
    }

    /* Detail items dark mode */
    .detail-item {
      background: #1F1F1F !important;
      border-color: var(--border-dark) !important;
    }

    /* Settings overlay background items dark mode */
    .settings-overlay .space-y-3 > div,
    .settings-overlay [style*="background: #f3f4f6"] {
      background: #1F1F1F !important;
    }

    /* Settings overlay additional items */
    .settings-overlay .p-3.rounded-md {
      background: #1F1F1F !important;
    }

    /* Sort button dark mode */
    .sort-btn {
      color: var(--text-dark) !important;
    }

    .sort-btn:hover {
      background-color: rgba(255, 255, 255, 0.1) !important;
    }

    .sort-btn.active {
      background-color: rgba(59, 130, 246, 0.2) !important;
    }

    /* Mobile tab selector dark mode */
    #panel-tab-selector-mobile {
      background: #1F1F1F !important;
      border-color: var(--border-dark) !important;
    }

    /* Manage citations button dark mode */
    #manage-citations-btn {
      background: #1F3A8A !important;
      color: var(--text-dark) !important;
    }

    #manage-citations-btn:hover {
      background: #1E40AF !important;
    }

    /* Additional specific elements that use inline styles */
    #citations-panel {
      border-color: var(--border-dark) !important;
    }

    .counter-card {
      background: #242424;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .counter-card:hover {
      background: #2a2a2a;
    }

    .counter-card {
      background: #242424;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .counter-card:hover {
      background: #2a2a2a;
    }

    .quote-table {
      border-color: var(--border-dark);
      background: rgba(36, 36, 36, 0.8);
      backdrop-filter: blur(10px);
    }

    .quote-table th,
    .quote-table td {
      border-color: var(--border-dark);
    }

    .quote-table th {
      background: #242424;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .quote-table tr:hover {
      background: #2B2A38;
    }

    .editor-container {
      background: #242424;
      border-color: var(--border-dark);
    }

    #citations-panel {
      border-color: var(--border-dark) !important;
    }

    .toolbar button,
    .manage-btn {
      background: #2a2a2a;
      color: var(--text-dark);
      border-color: var(--border-dark);
    }

    .toolbar button:hover {
      background: #333;

    }

    .manage-btn:hover {
      background: #333;
    }

    .citations-overlay,
    .settings-overlay,
    .help-overlay {
      background: rgba(36, 36, 36, 0.95);
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
      border-color: var(--border-dark);
      z-index: 100;
    }

    .overlay-background {
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(5px);
    }

    .confirmation-overlay {
      background: rgba(36, 36, 36, 0.95);
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
      border-color: var(--border-dark);
    }

    .confirmation-overlay h2 {
      color: #fff!important;
    }

    .confirmation-overlay button:first-child:hover {
      background: #B91C1C;
    }

    .confirmation-overlay button:last-child:hover {
      background: #4B5563;
    }

    .announcement-banner {
      background: #2e6f40;
      color: #fff;
      padding: 0.4rem 0.8rem;
      font-size: 0.9rem;
    }

    .announcement-content {
      gap: 0.4rem;
    }

    .announcement-icon {
      width: 16px;
      height: 16px;
    }

    .announcement-banner button {
      color: #fff;
      padding: 0.2rem;
    }

    .ad-banner {
      background: #1E3A8A;
      color: #BFDBFE;
    }

    .ad-banner button {
      color: #BFDBFE;
    }

    .logo {
      filter: invert(1);
    }
    #editor {
      caret-color: white!important;
    }

    /* Dark mode search container styles */
    .citations-search-container {
      background: var(--background-dark) !important;
      border-color: var(--border-dark) !important;
    }

    .citations-search-container input {
      color: var(--text-dark) !important;
      border-color: var(--border-dark) !important;
      background: transparent !important;
    }

    .citations-search-container input::placeholder {
      color: #6B7280 !important;
    }

    /* Dark mode info button tooltips */
    .info-dialogue {
      background: rgba(36, 36, 36, 0.95);
      border: 1px solid var(--border-dark);
    }

    .info-dialogue h3 {
      color: #fff;
    }

    .info-dialogue p {
      color: #D1D5DB;
    }
  }

  @media (prefers-color-scheme: light) {
    body {
      background: var(--background-light);
      color: var(--text-light);
    }

    header {
      background: rgba(240, 240, 240, 0.8); 
      border-bottom: 1px solid rgba(229, 231, 235, 0.5); 
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); 
    }

    .counter-card {
      background: #F0F0F0;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .counter-card:hover {
      background: #E0E0E0;
    }

    .quote-table {
      border-color: var(--border-light);
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(10px);
    }

    .quote-table th,
    .quote-table td {
      border-color: var(--border-light);
    }

    .quote-table tr:hover {
      background: rgba(65, 70, 74, 0.05);
    }

    .editor-container {
      background: #FFF;
      border-color: var(--border-light);
    }

    .toolbar button,
    .manage-btn {
      background: #F5F5F5;
      color: var(--text-light);
      border-color: var(--border-light);
    }
    
    .citations-overlay,
    .settings-overlay,
    .help-overlay {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .overlay-background {
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(5px);
    }

    .confirmation-overlay {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .confirmation-overlay button:first-child:hover {
      background: #B91C1C;
    }

    .confirmation-overlay button:last-child:hover {
      background: #D1D5DB;
    }

    #notification {
      background-color: rgba(255, 255, 255, 0.1);
      color: #fff;
    }
  
    #notification:hover {
      background-color: rgba(255, 255, 255, 0.15);
      transform: translateX(-50%) translateY(-2px);
      box-shadow: 0 6px 35px rgba(0, 0, 0, 0.4);
    }
  
    #progress-bar {
      background-color: rgb(255, 255, 255, 0.7)!important;
    }
  }

  #editor {
    outline: none;
    line-height: 1.5;
    padding: 3rem 1rem 1rem;
    font-size: 16px;
    height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    position: relative;
    caret-color: black;
    transition: background-color 0.2s ease;
  }

  #highlight-layer {
    position: absolute;
    top: 2.5rem;
    left: 1rem;
    width: calc(100% - 2rem);
    height: calc(100% - 2.5rem);
    pointer-events: none;
    padding: 0.5rem 0;
    line-height: 1.5;
    font-size: 16px;
    color: transparent;
    white-space: pre-wrap;
    overflow: hidden;
    word-break: break-word;
  }

  #highlight-layer .citation-highlight {
    border-radius: 2px;
    transition: all 0.3s ease;
    text-decoration: underline;
  }

  #highlight-layer .citation-highlight.included {
    background: var(--highlight-included);
  }

  #highlight-layer .citation-highlight.excluded {
    background: var(--highlight-excluded);
  }

  #highlight-layer .citation-highlight.included.active {
    animation: highlightFlashI 0.8s ease-in-out;
  }

  @keyframes highlightFlashI {

    0%,
    100% {
      background-color: var(--highlight-included);
    }

    50% {
      background-color: rgba(229, 255, 0, 0.6);
    }
  }

  #highlight-layer .citation-highlight.excluded.active {
    animation: highlightFlashE 0.8s ease-in-out;
  }

  @keyframes highlightFlashE {

    0%,
    100% {
      background-color: var(--highlight-excluded);
    }

    50% {
      background-color: rgba(229, 255, 0, 0.6);
    }
  }

  .editor-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
  }

  .toolbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem;
    background: inherit;
    border-bottom: 1px solid var(--border-light);
    z-index: 20;
  }

  .dark .toolbar {
    border-bottom-color: var(--border-dark);
  }

  .toolbar button,
  header button {
    transition: all 0.2s ease;
    border-width: 1px;
    padding: 0.25rem 0.5rem;
    position: relative;
    z-index: 21;
  }

  .toolbar button:hover::after,
  header button:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(51, 51, 51, 0.9);
    color: #FFF;
    padding: 0.35rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .counter-card {
    position: relative;
    transition: background-color 0.2s ease;
    min-width: 80px;
    min-height: 60px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
  }

  .stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.5rem 0 0.75rem;
  }

  .stats-row .counter-card {
    flex: 1;
    min-width: 0;
  }

  .stats-row .counter-card h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.875rem;
  }

  .quote-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }

  .quote-table-container {
    max-height: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 #F0F0F0;
    position: relative;
  }

  .quote-table-container::-webkit-scrollbar {
    width: 8px;
  }

  .quote-table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }

  .quote-table-container::-webkit-scrollbar-track {
    background: #F0F0F0;
  }

  .dark .quote-table-container::-webkit-scrollbar-track {
    background: #242424;
  }

  .quote-table th,
  .quote-table td {
    padding: 0.5rem 1rem;
    text-align: left;
    border-width: 1px;
  }

  .quote-table th {
    border-bottom-width: 2px;
    position: sticky;
    top: 0;
    background: #FFF;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .quote-table td {
    border-top-width: 0;
  }

  .quote-table tr:first-child th:first-child {
    border-top-left-radius: 0.5rem;
  }

  .quote-table tr:first-child th:last-child {
    border-top-right-radius: 0.5rem;
  }

  .quote-table tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
  }

  .quote-table tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
  }

  /* Citations Search Container */
  .citations-search-container {
    transition: background-color 0.3s, border-color 0.3s;
  }

  .citations-search-container input {
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
    color: var(--text-light);
  }

  .citations-search-container input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  }

  .citations-search-container input::placeholder {
    color: #9CA3AF;
  }

  .quote-table .citation-clickable {
    cursor: pointer;
    position: relative;
  }

  /* Sort Button Styles */
  .sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .sort-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
  }

  .sort-btn.active {
    opacity: 1;
    background-color: rgba(59, 130, 246, 0.1);
  }

  .sort-btn svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }

  .sort-btn .sort-text {
    color: inherit;
    font-size: inherit;
    font-weight: normal;
  }

  /* Dark mode support for sort button */
  .dark .sort-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .dark .sort-btn.active {
    background-color: rgba(59, 130, 246, 0.2);
  }

  .quote-table .citation-clickable::after {
    content: 'Click to jump to citation';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #FFF;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .quote-table .citation-clickable:hover::after {
    opacity: 1;
  }


  .split {
    padding-right: 16px!important;
  }
  
  @media (min-width: 1132px) and (max-width: 1280px) {

    .quote-table th,
    .quote-table td {
      padding: 0.75rem;
      min-width: 60px;
      /* Smaller minimum width */
      font-size: 0.875rem;
      /* Slightly smaller text */
    }

    .quote-table-container {
      overflow-x: auto;
      /* Ensure horizontal scrolling */
    }

    .quote-table {
      min-width: 100px;
      /* Minimum table width to prevent excessive squeezing */
    }
  }

  .citations-overlay,
  .settings-overlay,
  .help-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90%, 700px);
    max-height: 85vh;
    z-index: 60;
    padding: 1.5rem;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
  }

  @media (prefers-color-scheme: dark) {
    .citations-overlay,
    .settings-overlay,
    .help-overlay {
      background: rgba(17, 24, 39, 0.95);
      border-color: #374151;
    }
  }

  .citations-overlay h2,
  .settings-overlay h2,
  .help-overlay h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }

  .citations-overlay button,
  .help-overlay button {
    background: none;
    border: none;
    cursor: pointer;
  }

  /* Ensure settings action buttons keep their background */
  .settings-overlay #resetSettings {
    background: #ef4444 !important;
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
  }
  .settings-overlay #resetSettings:hover {
    background: #dc2626 !important;
  }

  .overlay-background {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .split {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .split-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-width: 1px;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
  }

  .editor-container.dragover {
    border: 4px dashed var(--primary-color); /* Thicker border */
    background-color: rgba(var(--primary-color-rgb), 0.1); /* Subtle background tint */
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3); /* Glow effect */
}
  .gutter {
    cursor: col-resize;
    width: 12px;
    margin: 0 2px;
    flex: 0 0 12px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="20" viewBox="0 0 12 20"><path fill="gray" d="M5 0h2v20H5z"/></svg>') no-repeat center;
    transition: all 0.2s ease;
  }

  .gutter:hover {
    background-color: #D1D5DB;
    transform: scale(1.1);
  }

  .gutter:active {
    background-color: #9CA3AF;
  }

  .welcome-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #888;
    pointer-events: none;
    display: block;
  }

  .welcome-text a {
    pointer-events: auto;
}


  .welcome-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    pointer-events: all;
  }

  .confirmation-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    z-index: 70;
    padding: 1.5rem;
    overflow-y: auto;
    display: none;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    text-align: center;
  }

  .confirmation-overlay h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
  }

  .confirmation-overlay p {
    margin-bottom: 1.5rem;
    color: #666;
  }

  .confirmation-overlay button {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
  }

  .confirmation-overlay button:first-child {
    background: #DC2626;
    color: #FFF;
    margin-right: 1rem;
    transition: background-color 0.2s ease;
  }

  .confirmation-overlay button:first-child:hover {
    background: #B91C1C;
  }

  .confirmation-overlay button:last-child {
    background: #E5E7EB;
    color: #333;
    transition: background-color 0.2s ease;
  }

  .confirmation-overlay button:last-child:hover {
    background: #D1D5DB;
  }

  /* Info button styles */
  .info-button {
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s ease;
  }

  .info-button:hover {
    opacity: 1 !important;
  }

  /* Info dialogue modal */
  .info-dialogue {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    z-index: 70;
    padding: 1.5rem;
    display: none;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .info-dialogue h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .info-dialogue p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
  }

  .info-dialogue button {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    background: #1E40AF;
    color: #FFF;
    transition: background-color 0.2s ease;
    display: block;
    margin: 0 auto;
  }

  .info-dialogue button:hover {
    background: #1D4ED8;
  }

  /* Tab underline animation */
  .panel-tab .tab-underline {
    transition: opacity 0.2s ease;
  }

  .panel-tab.active .tab-underline {
    opacity: 1 !important;
  }

  .manage-btn {
    transition: all 0.2s ease;
    background: linear-gradient(90deg, #5D5CDE, #7B7AE9);
    color: #FFF;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
  }

  .manage-btn:hover {
    background: linear-gradient(90deg, #4B4ACB, #6968D6);
  }

  .after-app-placeholder {
    position: static;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;

    z-index: -1;
    transition: bottom 0.3s ease;
  }

  .dark .after-app-placeholder {
    background: #242424;
  }

  @media (max-width: 1132px) {
    .counter-card:hover::after {
      content: attr(data-tooltip);
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(51, 51, 51, 0.9);
    color: #FFF;
    padding: 0.35rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
  .split {
    padding-right: 0!important;
  }
    .split {
      flex-direction: column;
      flex: 1;
      min-height: 0;
    }

    .gutter {
      display: none;
    }

    .editor-panel {
      flex: 1;
      min-height: 0;
    }

    .editor-container {
      flex: 1;
      min-height: 0;
      height: calc(100vh - 10rem);
    }

    .stats-row .counter-card {
      min-width: 0;
      flex: 1;
    }

    .manage-btn {
      width: 100%;
      margin-top: 0.5rem;
    }
  }

  #iframe-container {
    width: 100%;
    height: 888px;
    position: relative;
    margin-top: 1rem;
    overflow: hidden;
  }

  #forms {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
  }

  .help-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-height: 80vh;
    z-index: 60;
    padding: 1.5rem;
    overflow-y: auto;
    display: none;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    box-sizing: border-box;
  }

.landing-section {
    background: linear-gradient(90deg, #000428 0%, #004e92 100%)!important;
    color: white;
    padding: 4rem 0;
}

.alt-landing-section {
    background: linear-gradient(90deg, #001f5b 0%, #0076a8 100%)!important;
    color: white;
    padding: 4rem 0;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch; 
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-2px);  
    box-shadow: 0 6px 36px rgba(0, 0, 0, 0.2);  
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-image {
    width: 100%; 
    max-width: 888px;
    height: auto; 
    margin-bottom: 1rem; 
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    
}

.feature-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

@media (max-width: 663px) {
    .landing-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.8rem;
    }
    .feature-card {
        padding: 0.5rem;
        padding-top: 2rem;
    }
}

.blog {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  box-sizing: border-box;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  cursor: pointer;
  color: var(--color-white);
  
}

.blog:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--color-shadow-medium);
}

.blog h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
}

.blog p {
  margin: 0;
  font-size: 16px;
  color: #ffffffb3;
}

.cta {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  background: linear-gradient(45deg, rgba(255, 0, 150, 0.8), rgba(0, 204, 255, 0.8)); 
  filter: blur(15px);
  z-index: 0;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.cta:hover::before {
  opacity: 1;
}

.cta > * {
  position: relative;
  z-index: 1; 
}


#notification {
  visibility: hidden;
  min-width: 250px;
  background-color: rgba(50, 50, 50, 0.6);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  padding: 16px;
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 30px;
  font-size: 1em;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 30px var(--color-shadow-medium);
  cursor: pointer;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);

}

#notification:hover {
  background-color: rgba(50, 50, 50, 0.8);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 35px var(--color-shadow-dark);
}

#notification.show {
  visibility: visible;
  opacity: 1;
}

#progress-bar {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.7);
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  transition: width 0.1s linear;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 5px var(--color-shadow-light);
}

#donation-alert {
  visibility: hidden;
  min-width: 250px;
  background-color: rgba(50, 50, 50, 0.6);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  padding: 16px;
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: 20px;
  font-size: 1em;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

#donation-alert.show {
  visibility: visible;
  opacity: 1;
}

#donation-alert:hover {
  background-color: rgba(50, 50, 50, 0.8);
  box-shadow: 0 6px 35px rgba(0, 0, 0, 0.4);
}

#donation-alert p {
  margin: 0 0 12px;
  font-size: 0.9em;
}

#donation-alert .btn-container {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#donation-alert button {
  padding: 6px 12px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

#donation-alert .donate-btn {
  background: #16A34A; 
  color: #fff;
}

#donation-alert .donate-btn:hover {
  background: #15803D; 
}

#donation-alert .no-thanks-btn {
  background: #E5E7EB; 
  color: #333;
}

#donation-alert .no-thanks-btn:hover {
  background: #D1D5DB; 
}
@media (prefers-color-scheme: dark) {
  #donation-alert {
    background-color: rgba(255, 255, 255, 0.1);
    color: #F5F5F5;
    backdrop-filter: blur(10px);
    box-shadow: none;
  }

  #donation-alert:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }

  #donation-alert .no-thanks-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #F5F5F5;
  }

  #donation-alert .no-thanks-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }
}

.noscript-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 30px;
  font-weight: 900;
  background-color: rgba(255, 0, 0, 0.5);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  text-align: center;
  padding: 30px;
}

.noscript-container div {
  text-align: center;
}

.noscript-message {
  margin: 0;
  font-size: 36px;
}

.noscript-description {
  margin: 20px 10%;
  font-size: 24px; 
  font-weight: 700; 
}

#devToolsWindow {
  --background: rgba(255, 255, 255, 0.9);
  --header-bg: rgba(245, 245, 245, 0.95);
  --tabs-bg: rgba(235, 235, 235, 0.95);
  --tab-button-bg: rgba(200, 200, 200, 0.8);
  --tab-button-active: rgba(0, 122, 204, 0.9);
  --text-color: #333333;
  --border-color: rgba(150, 150, 150, 0.3);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --table-bg: rgba(245, 245, 245, 0.9);
  --table-header-bg: rgba(230, 230, 230, 0.95);
  --nested-table-bg: rgba(220, 220, 220, 0.9);
  --resize-handle-bg: rgba(150, 150, 150, 0.7);
  --button-danger-bg: rgba(220, 53, 69, 0.9);
}

@media (prefers-color-scheme: dark) {
  #devToolsWindow {
    --background: rgba(30, 30, 30, 0.9);
    --header-bg: rgba(45, 45, 45, 0.95);
    --tabs-bg: rgba(37, 37, 38, 0.95);
    --tab-button-bg: rgba(60, 60, 60, 0.8);
    --tab-button-active: rgba(0, 122, 204, 0.9);
    --text-color: #ffffff;
    --border-color: rgba(68, 68, 68, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --table-bg: rgba(40, 40, 40, 0.9);
    --table-header-bg: rgba(50, 50, 50, 0.95);
    --nested-table-bg: rgba(45, 45, 46, 0.9);
    --resize-handle-bg: rgba(68, 68, 68, 0.7);
    --button-danger-bg: rgba(220, 53, 69, 0.9);
  }
}

#devToolsWindow {
  position: fixed;
  top: 50px;
  left: 50px;
  width: 400px;
  height: 300px;
  background: var(--background);
  backdrop-filter: blur(10px);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--shadow-color);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

#devToolsHeader {
  padding: 8px;
  background: var(--header-bg);
  backdrop-filter: blur(5px);
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

#devToolsClose {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#devToolsClose:hover {
  opacity: 1;
}

#devToolsTabs {
  padding: 5px;
  background: var(--tabs-bg);
  backdrop-filter: blur(5px);
  display: flex;
  gap: 5px;
  overflow-x: auto; /* Enable horizontal scrolling */
  white-space: nowrap; /* Keep tabs in a single row */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: thin; /* Firefox: thinner scrollbar */
  scrollbar-color: var(--tab-button-bg) var(--tabs-bg); /* Firefox: scrollbar colors */
}

#devToolsTabs::-webkit-scrollbar {
  height: 6px; /* Chrome/Safari: thinner scrollbar */
}

#devToolsTabs::-webkit-scrollbar-thumb {
  background: var(--tab-button-bg);
  border-radius: 3px;
}

#devToolsTabs::-webkit-scrollbar-track {
  background: var(--tabs-bg);
}

.tab-button {
  padding: 5px 10px;
  background: var(--tab-button-bg);
  border: none;
  color: var(--text-color);
  cursor: pointer;
  border-radius: 4px;
}

.tab-button:hover {
  background: rgba(0, 122, 204, 0.2);
}

.tab-button.active {
  background: var(--tab-button-active);
}

#devToolsContent {
  flex: 1;
  overflow: auto;
  padding: 10px;
  background: var(--background);
}

.tab-content {
  display: none;
}

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

.storage-controls {
  margin-bottom: 10px;
}

#clearAllStorage,
#clearAllCookies {
  padding: 5px 10px;
  background: var(--button-danger-bg);
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 4px;
}

#clearAllStorage:hover,
#clearAllCookies:hover {
  background: rgba(220, 53, 69, 1);
}

#devToolsWindow {

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  background: var(--table-bg);
  border-radius: 4px;
}

th, td {
  padding: 5px;
  border: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--table-header-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.nested-table {
  width: 100%;
  background: var(--nested-table-bg);
  border-radius: 4px;
}

.clear-storage-btn {
  padding: 2px 8px;
  background: var(--button-danger-bg);
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 4px;
}

.clear-storage-btn:hover {
  background: rgba(220, 53, 69, 1);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--table-bg);
  padding: 5px;
  border-radius: 4px;
}

#resizeHandle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--resize-handle-bg);
  cursor: se-resize;
  border-radius: 50%;
}

#resizeHandle:hover {
  background: rgba(0, 122, 204, 0.5);
}

#opacitySlider {
  width: 100%;
}

#forceLightTheme,
#forceDarkTheme,#restartApp,#restartDebug {
  padding: 5px 10px;
  background: var(--tab-button-bg);
  border: none;
  color: var(--text-color);
  cursor: pointer;
  border-radius: 4px;
  margin-right: 5px;
}

#forceLightTheme:hover,
#forceDarkTheme:hover,#restartApp:hover,#restartDebug:hover {
  background: rgba(0, 122, 204, 0.2);
}

#forceLightTheme.active,
#forceDarkTheme.active,#restartApp.active,#restartDebug.active {
  background: var(--tab-button-active);
}
}

/* Format dropdown styles */
#format-dropdown {
  z-index: 60;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#format-dropdown button {
  color: var(--text-primary);
  transition: background-color 0.2s ease;
}

#format-dropdown button:hover {
  background-color: var(--button-hover-bg);
}

.dark #format-dropdown {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.dark #format-dropdown button {
  color: var(--text-primary);
}

.dark #format-dropdown button:hover {
  background-color: var(--button-hover-bg);
}

/* Font size slider styles */
#fontSizeSlider {
  -webkit-appearance: none;
  appearance: none;
}

#fontSizeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#fontSizeSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#fontSizeSlider::-webkit-slider-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #e5e7eb;
  border-radius: 4px;
}

#fontSizeSlider::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #e5e7eb;
  border-radius: 4px;
  border: none;
}

@media (prefers-color-scheme: dark) {
  #fontSizeSlider::-webkit-slider-track {
    background: #374151;
  }
  
  #fontSizeSlider::-moz-range-track {
    background: #374151;
  }
}

/* Font family dropdown styles */
#fontFamilyDropdown {
  z-index: 1000;
}

#fontFamilyDropdown .font-option {
  color: var(--text-primary);
  transition: background-color 0.2s ease;
}

#fontFamilyButton {
  transition: border-color 0.2s ease;
}

#fontFamilyButton:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (prefers-color-scheme: dark) {
  #fontFamilyDropdown {
    background: var(--background-dark);
    border-color: var(--border-dark);
  }
  
  #fontFamilyDropdown .font-option {
    color: var(--text-dark);
  }
  
  #fontFamilyDropdown .font-option:hover {
    background: #374151;
  }
  
  #fontFamilyButton {
    background: var(--background-dark);
    border-color: var(--border-dark);
    color: var(--text-dark);
  }
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 400px;
  background: var(--surface-color);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-content {
  padding: 20px;
}

.cookie-icon {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #8B5CF6;
}

.cookie-text h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.cookie-text p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.cookie-links {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.cookie-links a {
  font-size: 12px;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

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

.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.cookie-btn.primary {
  background: var(--accent-color);
  color: white;
}

.cookie-btn.primary:hover {
  background: #1E3A8A;
}

.cookie-btn.secondary {
  background: var(--background-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.cookie-btn.secondary:hover {
  background: var(--border-primary);
}

.cookie-btn.text {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.cookie-btn.text:hover {
  background: var(--background-secondary);
  color: var(--text-primary);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-settings-content {
  background: var(--surface-color);
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideInScale 0.3s ease-out;
}

@keyframes slideInScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 20px;
}

.cookie-settings-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background: var(--background-secondary);
}

.cookie-settings-body {
  padding: 0 20px 20px 20px;
}

.cookie-category {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-primary);
}

.cookie-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-category h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.cookie-category p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

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

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

.cookie-toggle.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.cookie-settings-footer {
  padding: 20px;
  border-top: 1px solid var(--border-primary);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .cookie-consent-banner {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .cookie-content {
    padding: 16px;
  }
  
  .cookie-icon {
    display: none; /* Hide icon on mobile to save space */
  }
  
  .cookie-text h4 {
    font-size: 15px;
    margin-bottom: 6px;
  }
  
  .cookie-text p {
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 10px;
  }
  
  .cookie-links {
    margin-bottom: 12px;
    gap: 12px;
  }
  
  .cookie-links a {
    font-size: 11px;
  }
  
  .cookie-settings-modal {
    padding: 10px;
  }
  
  .cookie-settings-content {
    width: 100%;
    margin: 0;
    max-height: 90vh;
    border-radius: 8px;
  }
  
  .cookie-settings-header {
    padding: 16px 16px 0 16px;
    margin-bottom: 16px;
  }
  
  .cookie-settings-header h3 {
    font-size: 16px;
  }
  
  .cookie-settings-body {
    padding: 0 16px 16px 16px;
  }
  
  .cookie-category {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .cookie-category h4 {
    font-size: 14px;
  }
  
  .cookie-category p {
    font-size: 12px;
    line-height: 1.3;
  }
  
  .cookie-settings-footer {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  
  .cookie-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .cookie-actions {
    flex-direction: column;
    gap: 6px;
  }
  
  .cookie-toggle {
    width: 38px;
    height: 20px;
  }
  
  .cookie-toggle .slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
  }
  
  .cookie-toggle input:checked + .slider:before {
    transform: translateX(18px);
  }
}

@media (prefers-color-scheme: dark) {
  .cookie-consent-banner {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .cookie-consent-banner {
    bottom: 5px;
    right: 5px;
    left: 5px;
  }
  
  .cookie-content {
    padding: 12px;
  }
  
  .cookie-text h4 {
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  .cookie-text p {
    font-size: 12px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  
  .cookie-links {
    margin-bottom: 10px;
    gap: 10px;
  }
  
  .cookie-links a {
    font-size: 10px;
  }
  
  .cookie-settings-modal {
    padding: 5px;
  }
  
  .cookie-settings-header {
    padding: 12px 12px 0 12px;
    margin-bottom: 12px;
  }
  
  .cookie-settings-header h3 {
    font-size: 15px;
  }
  
  .cookie-settings-body {
    padding: 0 12px 12px 12px;
  }
  
  .cookie-category {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  
  .cookie-category h4 {
    font-size: 13px;
  }
  
  .cookie-category p {
    font-size: 11px;
  }
  
  .cookie-settings-footer {
    padding: 10px 12px;
  }
  
  .cookie-btn {
    padding: 7px 12px;
    font-size: 12px;
  }
}

