/* HID URL Shortener Frontend Styles */

:root {
  /* Dark theme variables and styles */
  --hid-bg: #0d1117;
  --hid-surface: #161b22;
  --hid-text: #f0f6fc;
  --hid-text-muted: #8b949e;
  --hid-border: #30363d;
  --hid-input-bg: #0d1117;
  --hid-input-border: #30363d;
  --hid-btn-bg: #ff6b35;
  --hid-btn-hover: #e55a2b;
  --hid-success: #238636;
  --hid-error: #da3633;
  --hid-warning: #d29922;
  --hid-info: #1f6feb;
  --hid-dark-bg: #0d1117;
  --hid-dark-surface: #161b22;
  --hid-dark-border: #30363d;
  --hid-dark-text: #f0f6fc;
  --hid-dark-input-bg: #0d1117;
  --hid-light-text-secondary: #6c757d;
  --hid-light-border: #dee2e6;
  --hid-light-input-bg: #ffffff;
  
  /* Orange accent colors */
  --hid-orange: #ff6b35;
  --hid-orange-hover: #e55a2b;
  --hid-orange-light: #ff8c5a;
  
  /* Grey colors for buttons and titles */
  --hid-grey: #6c757d;
  --hid-grey-hover: #5a6268;
  --hid-grey-light: #868e96;
  
  /* Status colors */
  --hid-success: #28a745;
  --hid-error: #dc3545;
  --hid-warning: #ffc107;
  
  /* Shadows */
  --hid-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --hid-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --hid-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
  
  /* Border radius */
  --hid-radius-sm: 4px;
  --hid-radius-md: 8px;
  --hid-radius-lg: 12px;
  
  /* Transitions */
  --hid-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.hid-shortener-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
}

/* Theme transitions */
.hid-shortener-container.theme-transitioning * {
  transition: var(--hid-transition);
}

/* Dark theme styles */
.hid-shortener-container[data-theme="dark"] {
  background-color: var(--hid-dark-bg);
  color: var(--hid-dark-text);
}

.hid-shortener-container[data-theme="dark"] .hid-main-form,
.hid-shortener-container[data-theme="dark"] .hid-user-urls,
.hid-shortener-container[data-theme="dark"] .hid-result {
  background-color: var(--hid-dark-surface);
  border-color: var(--hid-dark-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hid-shortener-container[data-theme="dark"] input,
.hid-shortener-container[data-theme="dark"] textarea,
.hid-shortener-container[data-theme="dark"] select {
  background-color: var(--hid-dark-input-bg);
  border-color: var(--hid-dark-border);
  color: var(--hid-dark-text);
}

.hid-shortener-container[data-theme="dark"] input:focus,
.hid-shortener-container[data-theme="dark"] textarea:focus,
.hid-shortener-container[data-theme="dark"] select:focus {
  border-color: var(--hid-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.hid-shortener-container[data-theme="dark"] .hid-btn-secondary {
  background-color: var(--hid-grey);
  color: white;
  border-color: var(--hid-grey);
}

.hid-shortener-container[data-theme="dark"] .hid-btn-secondary:hover:not(:disabled) {
  background-color: var(--hid-grey-hover);
}

/* Light theme styles */
.hid-shortener-container[data-theme="light"] {
  background-color: var(--hid-light-bg);
  color: var(--hid-light-text);
}

.hid-shortener-container[data-theme="light"] .hid-main-form,
.hid-shortener-container[data-theme="light"] .hid-user-urls,
.hid-shortener-container[data-theme="light"] .hid-result {
  background-color: var(--hid-light-surface);
  border-color: var(--hid-light-border);
}

.hid-shortener-container[data-theme="light"] input,
.hid-shortener-container[data-theme="light"] textarea,
.hid-shortener-container[data-theme="light"] select {
  background-color: var(--hid-light-input-bg);
  border-color: var(--hid-light-border);
  color: var(--hid-light-text);
}

.hid-shortener-container[data-theme="light"] .hid-btn-secondary {
  background-color: var(--hid-grey);
  color: white;
  border-color: var(--hid-grey);
}

.hid-shortener-container[data-theme="light"] .hid-btn-secondary:hover:not(:disabled) {
  background-color: var(--hid-grey-hover);
}

/* Theme toggle switch */
.hid-theme-toggle {
  position: absolute;
  top: 30px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  position: relative;
  width: 60px;
  height: 30px;
  background: #ccc;
  border-radius: 15px;
  cursor: pointer;
  transition: var(--hid-transition);
  border: none;
  outline: none;
}

.theme-switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: var(--hid-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hid-shortener-container[data-theme="dark"] .theme-switch {
  background: var(--hid-orange);
}

.hid-shortener-container[data-theme="dark"] .theme-switch::before {
  transform: translateX(30px);
}

.theme-icon {
  font-size: 18px;
  transition: var(--hid-transition);
}

.theme-icon.sun {
  color: #ffc107;
}

.theme-icon.moon {
  color: #6c757d;
}

.hid-shortener-container[data-theme="dark"] .theme-icon.sun {
  opacity: 0.5;
}

.hid-shortener-container[data-theme="dark"] .theme-icon.moon {
  opacity: 1;
  color: white;
}

.hid-shortener-container[data-theme="light"] .theme-icon.sun {
  opacity: 1;
}

.hid-shortener-container[data-theme="light"] .theme-icon.moon {
  opacity: 0.5;
}

/* Main form */
.hid-main-form {
  background: var(--hid-light-surface);
  border: 1px solid var(--hid-light-border);
  border-radius: var(--hid-radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--hid-shadow-md);
  transition: var(--hid-transition);
}

.hid-header {
  text-align: center;
  margin-bottom: 30px;
}

.hid-header h2 {
  margin: 0 0 10px 0;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--hid-orange), var(--hid-orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hid-header p {
  margin: 0;
  opacity: 0.8;
  font-size: 1.1rem;
}

/* Form styles */
.hid-form-group {
  margin-bottom: 20px;
}

.hid-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--hid-orange);
}

.hid-form-group input,
.hid-form-group textarea,
.hid-form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--hid-light-border);
  border-radius: var(--hid-radius-md);
  font-size: 16px;
  transition: var(--hid-transition);
  box-sizing: border-box;
}

.hid-form-group input:focus,
.hid-form-group textarea:focus,
.hid-form-group select:focus {
  outline: none;
  border-color: var(--hid-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.hid-form-group small {
  display: block;
  margin-top: 5px;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* User info */
.hid-user-info {
  margin-bottom: 20px;
  text-align: center;
}

.user-badge {
  display: inline-block;
  background: var(--hid-orange);
  color: white;
  padding: 6px 12px;
  border-radius: var(--hid-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Buttons */
.hid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--hid-radius-md);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--hid-transition);
  position: relative;
  overflow: hidden;
}

.hid-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hid-btn-primary {
  background: linear-gradient(135deg, var(--hid-orange), var(--hid-orange-light));
  color: white;
  border-color: var(--hid-orange);
}

.hid-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--hid-orange-hover), var(--hid-orange));
  transform: translateY(-2px);
  box-shadow: var(--hid-shadow-lg);
}

.hid-btn-secondary {
  background: var(--hid-grey);
  color: white;
  border-color: var(--hid-grey);
}

.hid-btn-secondary:hover:not(:disabled) {
  background: var(--hid-grey-hover);
  transform: translateY(-2px);
  box-shadow: var(--hid-shadow-md);
}

.hid-btn-copy,
.hid-btn-download {
  padding: 8px 16px;
  font-size: 14px;
  margin-left: 10px;
}

/* Button loading state */
.hid-btn.loading .btn-text {
  opacity: 0;
}

.hid-btn.loading .btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Result display */
.hid-result {
  background: var(--hid-light-surface);
  border: 1px solid var(--hid-light-border);
  border-radius: var(--hid-radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--hid-shadow-md);
  animation: slideIn 0.5s ease-out;
}

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

.result-header {
  text-align: center;
  margin-bottom: 25px;
}

.result-header h3 {
  margin: 0;
  color: var(--hid-success);
  font-size: 1.5rem;
}

.result-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 25px;
}

.url-section,
.qr-section {
  text-align: center;
}

.url-section label,
.qr-section label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--hid-orange);
}

.url-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.url-display input {
  flex: 1;
  font-family: monospace;
  font-size: 14px;
  text-align: center;
}

.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.qr-display img {
  max-width: 150px;
  border-radius: var(--hid-radius-md);
  box-shadow: var(--hid-shadow-sm);
}

/* Larger QR codes in URL list */
.url-item-qr {
  max-width: 80px;
  height: auto;
  border-radius: var(--hid-radius-sm);
  cursor: pointer;
  transition: var(--hid-transition);
}

.url-item-qr:hover {
  transform: scale(1.1);
}

.result-actions {
  text-align: center;
}

/* Error display */
.hid-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid var(--hid-error);
  border-radius: var(--hid-radius-md);
  padding: 15px;
  margin-bottom: 20px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hid-error);
  font-weight: 600;
}

.error-icon {
  font-size: 1.2rem;
}

/* User URLs section */
.hid-user-urls {
  background: var(--hid-light-surface);
  border: 1px solid var(--hid-light-border);
  border-radius: var(--hid-radius-lg);
  padding: 30px;
  box-shadow: var(--hid-shadow-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  margin: 0;
  color: var(--hid-orange);
}

.urls-list {
  display: grid;
  gap: 15px;
}

.url-item {
  background: rgba(255, 107, 53, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--hid-radius-md);
  padding: 20px;
  transition: var(--hid-transition);
}

.url-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hid-shadow-md);
}

.url-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.url-item-title {
  font-weight: 600;
  margin: 0 0 5px 0;
}

.url-item-short {
  font-family: monospace;
  color: var(--hid-grey) !important;
  font-size: 0.875rem;
}

.hid-shortener-container[data-theme="dark"] .url-item-short {
  color: var(--hid-grey-light) !important;
}

.hid-shortener-container[data-theme="dark"] .url-item {
  background-color: var(--hid-dark-surface);
  border-color: var(--hid-dark-border);
}

.hid-shortener-container[data-theme="dark"] .url-item:hover {
  background-color: rgba(255, 107, 53, 0.05);
  border-color: rgba(255, 107, 53, 0.2);
}

.hid-shortener-container[data-theme="dark"] .url-item-title {
  color: var(--hid-dark-text);
}

.hid-shortener-container[data-theme="dark"] .url-item-meta {
  color: #8b949e;
}

.hid-shortener-container[data-theme="light"] .url-item-short {
  color: var(--hid-grey) !important;
}

.url-item-actions {
  display: flex;
  gap: 5px;
}

.url-item-actions .hid-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.url-item-original {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 10px;
  word-break: break-all;
}

.url-item-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  opacity: 0.7;
}

.url-item-clicks {
  font-weight: 600;
  color: var(--hid-orange);
}

/* Loading states */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 40px;
  opacity: 0.7;
}

.loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 107, 53, 0.3);
  border-top: 2px solid var(--hid-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Modal styles */
.hid-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

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

.modal-content {
  background: var(--hid-light-bg);
  border-radius: var(--hid-radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--hid-shadow-lg);
  animation: slideUp 0.3s ease-out;
  padding: 0;
}

/* Dark theme modal */
.hid-shortener-container[data-theme="dark"] .modal-content {
  background: var(--hid-dark-surface) !important;
  color: var(--hid-dark-text) !important;
}

.hid-shortener-container[data-theme="dark"] .modal-header {
  border-bottom-color: var(--hid-dark-border) !important;
}

.hid-shortener-container[data-theme="dark"] .modal-body {
  background: var(--hid-dark-surface) !important;
  color: var(--hid-dark-text) !important;
}

/* Fix for dynamically created QR modal */
[data-theme="dark"] .modal-content {
  background: var(--hid-dark-surface) !important;
  color: var(--hid-dark-text) !important;
}

[data-theme="dark"] .modal-header {
  border-bottom-color: var(--hid-dark-border) !important;
}

[data-theme="dark"] .modal-body {
  background: var(--hid-dark-surface) !important;
  color: var(--hid-dark-text) !important;
}

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

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

.modal-header h3 {
  margin: 0;
  color: var(--hid-orange);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: var(--hid-radius-sm);
  transition: var(--hid-transition);
}

.modal-close:hover {
  background: rgba(255, 107, 53, 0.1);
}

.modal-body {
  padding: 30px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
  .hid-shortener-container {
    padding: 15px;
  }
  
  .hid-main-form,
  .hid-result,
  .hid-user-urls {
    padding: 20px;
  }
  
  .hid-header h2 {
    font-size: 2rem;
  }
  
  .result-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .url-display {
    flex-direction: column;
    gap: 10px;
  }
  
  .url-display input {
    text-align: left;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .url-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .url-item-actions {
    align-self: flex-end;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header,
  .modal-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hid-theme-toggle {
    position: relative;
    top: auto;
    right: auto;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .hid-btn {
    width: 100%;
    justify-content: center;
  }
  
  .url-item-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* Copy success animation */
.copy-success {
  animation: copySuccess 0.6s ease-out;
}

@keyframes copySuccess {
  0% {
    background-color: var(--hid-success);
    color: white;
  }
  100% {
    background-color: initial;
    color: initial;
  }
}

/* Hover effects */
.hid-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.url-item:hover .url-item-short {
  color: var(--hid-orange-hover);
}

/* Focus styles for accessibility */
.hid-btn:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--hid-orange);
  outline-offset: 2px;
}

/* QR Icon Options */
.qr-icon-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.qr-icon-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
  border: 1px solid var(--hid-light-border);
  border-radius: var(--hid-radius-md);
  transition: var(--hid-transition);
}

.qr-icon-option:hover {
  background-color: rgba(255, 107, 53, 0.05);
  border-color: var(--hid-orange);
}

.qr-icon-option input[type="radio"] {
  width: auto;
  margin: 0;
}

.custom-icon-upload {
  margin-top: 15px;
  padding: 15px;
  border: 2px dashed var(--hid-light-border);
  border-radius: var(--hid-radius-md);
  text-align: center;
}

.icon-preview {
  margin: 15px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-preview img {
  max-width: 60px;
  max-height: 60px;
  border-radius: var(--hid-radius-sm);
  border: 1px solid var(--hid-light-border);
}

.icon-preview .preview-text {
  color: var(--hid-grey);
  font-style: italic;
}

/* Dark theme QR options */
.hid-shortener-container[data-theme="dark"] .qr-icon-option {
  border-color: var(--hid-dark-border);
  background-color: var(--hid-dark-surface);
}

.hid-shortener-container[data-theme="dark"] .qr-icon-option:hover {
  background-color: rgba(255, 107, 53, 0.1);
}

.hid-shortener-container[data-theme="dark"] .custom-icon-upload {
  border-color: var(--hid-dark-border);
  background-color: var(--hid-dark-surface);
}

.hid-shortener-container[data-theme="dark"] .icon-preview img {
  border-color: var(--hid-dark-border);
}

/* QR Code Animation */
@keyframes faviconPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(180deg);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3) rotate(90deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

/* High Quality QR Container */
#hid-qr-container {
  background: white !important;
  padding: 10px !important;
  border-radius: 5px !important;
  display: inline-block;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#hid-qr-code {
  width: 256px !important;
  height: 256px !important;
  display: block;
}

#hid-qr-code canvas {
  display: block !important;
  margin: 0 auto !important;
  width: 256px !important;
  height: 256px !important;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  image-rendering: pixelated !important;
}

#hid-qr-code img {
  display: none !important;
}

/* Result success message styling */
.hid-result-success h3 {
  color: white !important;
}

/* Print styles */
@media print {
  .hid-theme-toggle,
  .hid-btn,
  .url-item-actions {
    display: none;
  }
  
  .hid-shortener-container {
    box-shadow: none;
  }
  
  .qr-display img {
    max-width: 100px;
  }
}
/* Add these styles to assets/css/frontend.css */

/* QR Code in History Items */
.url-item-qr-container {
    position: relative;
    display: inline-block;
    background: white;
    padding: 5px;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

.url-item-qr-container:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.url-item-qr-container::after {
    content: "🔍";
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--hid-orange);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.url-item-qr-container:hover::after {
    opacity: 1;
}

/* Small icon overlay for history QR codes */
.icon-overlay-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: white;
    padding: 2px;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.icon-overlay-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* QR Modal Enhancements */
#hid-qr-modal .modal-body {
    padding: 30px;
    text-align: center;
}

#hid-qr-modal .qr-container {
    background: white;
    display: inline-block;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark theme adjustments for QR containers */
.hid-shortener-container[data-theme="dark"] .url-item-qr-container {
    background: #2d2d2d;
    border: 1px solid var(--hid-dark-border);
}

.hid-shortener-container[data-theme="dark"] .url-item-qr-container:hover {
    background: #3d3d3d;
}

/* Loading state for QR codes */
.url-item-qr-container.loading {
    background: #f0f0f0;
}

.url-item-qr-container.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: var(--hid-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Tooltip for QR codes */
.url-item-qr-container[title] {
    position: relative;
}

.url-item-qr-container::before {
    content: "Click to view full QR code";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.url-item-qr-container:hover::before {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .url-item-qr-container {
        display: block;
        margin-top: 10px;
        margin-left: 0;
        width: 74px;
        height: 74px;
        padding: 5px;
    }
    
    .url-item-stats {
        flex-direction: column;
        align-items: flex-start;
    }
}