
/* Micro-interaction: Offense Cards */
.offense-card {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.3s ease;
  will-change: transform;
}

.offense-card:active {
  transform: scale(0.95);
}

.offense-card.selected {
  animation: popSelect 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 4px 15px rgba(10, 132, 255, 0.3);
}

@keyframes popSelect {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Make toasts look more premium */
.toast-message {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(30, 30, 35, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 12px;
}

/* Particles */
.gk-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  animation: particleFade 0.6s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes particleFade {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}

/* =========================================
   ULTRA PREMIUM ROUNDED OVERRIDES (GOAL) 
   ========================================= */

/* Pill-shaped buttons everywhere for cleaner, modern look */
#app button, #app .btn, #app .btn-primary, #app .btn-secondary, #app .win-btn, #app .tabs button, #app .gk-btn, #app .zone-pill-btn, #app .btn-action-plate, #app .btn-action-akte, #app .auth-tabs button, #app .btn-ansicht, #app .rights-buttons button, #app .btn-profil-design, #app .small { 
  border-radius: 9999px !important; 
}

/* The window close button should stay round */
.win-btn.close {
  border-radius: 50% !important;
}

/* Inputs and Selects should be pleasantly rounded but not full pills */
input, select, textarea, .login-input, .small-input, .settings-input,
input[type="text"], input[type="number"], input[type="password"], input[type="date"], input[type="time"] { 
  border-radius: 20px !important; 
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background-color: rgba(30, 30, 35, 0.6) !important;
  color: white !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 16px !important;
  font-size: 0.9rem !important;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s !important;
}

select, select.small-input {
  font-family: inherit !important;
  /* Restore the dropdown arrow */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1em !important;
  background-color: rgba(30, 30, 35, 0.6) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 2.5rem !important;
}

/* Driver.js Dark Mode Overrides */
.driver-popover {
  background: rgba(30, 30, 35, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  color: white !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}
.driver-popover-title {
  color: var(--accent) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
}
.driver-popover-description {
  color: #ccc !important;
  font-family: 'Inter', sans-serif !important;
}
.driver-popover-footer button {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 9999px !important;
  border: none !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}
.driver-popover-footer .driver-popover-prev-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ccc !important;
  text-shadow: none !important;
}
.driver-popover-footer button:hover {
  filter: brightness(1.2) !important;
}
.driver-popover-progress-text {
  color: #888 !important;
}
.driver-active-element {
  outline: 3px solid var(--accent) !important;
  outline-offset: 4px !important;
  border-radius: 8px !important;
  box-shadow: 0 0 20px var(--accent-glow) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

input:focus, select:focus, textarea:focus,
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="time"]:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3) !important;
  background: rgba(40, 40, 45, 0.8) !important;
  outline: none !important;
}

/* High-radius premium glass panels */
.glass-panel, .result-panel, .rights-card, .offense-card, .sidebar, .content, .settings-modal, .rating-modal, .calc-inputs { 
  border-radius: 24px !important; 
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.star.voluntary:hover {
  transform: scale(1.3);
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

/* Modals should be even smoother */
.modal-content, .login-box { 
  border-radius: 28px !important; 
}

/* Elevated Hover Effects for primary buttons */
button:hover, .btn-primary:hover, .btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure tabs get distinct hover states */
.tabs button.active {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}


/* Gesetzbuch Premium Redesign overrides */
#gesetzbuch-content {
  color: var(--text-main) !important;
  font-family: 'Inter', sans-serif !important;
  line-height: 1.7 !important;
  padding: 10px 20px;
}
#gesetzbuch-content * {
  background-color: transparent !important;
}
#gesetzbuch-content span {
  color: inherit !important;
  font-family: inherit !important;
  font-size: 1em !important;
}
#gesetzbuch-content p {
  margin-bottom: 1.2em !important;
  font-size: 1.05em !important;
  color: rgba(255, 255, 255, 0.85) !important;
}
#gesetzbuch-content h1 {
  font-size: 1.8em !important;
  color: var(--accent) !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
  padding-bottom: 10px !important;
  margin-top: 2em !important;
  margin-bottom: 1em !important;
  font-weight: 700 !important;
}
#gesetzbuch-content h1:first-child {
  margin-top: 0 !important;
}
#gesetzbuch-content h2 {
  font-size: 1.5em !important;
  color: #fff !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.8em !important;
  font-weight: 600 !important;
}
#gesetzbuch-content h3 {
  font-size: 1.2em !important;
  color: var(--text-primary) !important;
  margin-top: 1.2em !important;
  margin-bottom: 0.5em !important;
  font-weight: 600 !important;
}
#gesetzbuch-content a {
  color: var(--accent) !important;
  text-decoration: none !important;
  border-bottom: 1px dashed var(--accent);
  transition: all 0.2s ease;
}
#gesetzbuch-content a:hover {
  border-bottom: 1px solid var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}
#gesetzbuch-content ul, #gesetzbuch-content ol {
  margin-bottom: 1.2em !important;
  padding-left: 1.5em !important;
}
#gesetzbuch-content li {
  margin-bottom: 0.5em !important;
  color: rgba(255, 255, 255, 0.85) !important;
}


/* ====== OLD-STYLE FLAT OFFENSE CARD ====== */
.offense-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s !important;
}

.offense-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-2px) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.offense-card.selected {
  border-color: var(--accent) !important;
  background: rgba(var(--accent-rgb, 0,210,255), 0.1) !important;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb, 0,210,255), 0.2) !important;
  transform: translateY(-2px) scale(1.01) !important;
}

.offense-id {
  font-size: 0.8rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb, 0,212,255), 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
}

.offense-name {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.offense-fine {
  font-size: 0.9rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.offense-stars {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Wanted Stars: mandatory = golden, voluntary = silver */
.star.mandatory {
  color: #fbbf24 !important;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}
.star.voluntary {
  color: rgba(220, 220, 220, 0.8) !important; /* Silver */
}
.star.voluntary.active {
  color: #fbbf24 !important;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}
.star.voluntary.silver {
  color: #c0c0c0 !important;
  text-shadow: 0 0 5px rgba(192, 192, 192, 0.6);
}

/* ====== LIST VIEW ====== */
.offense-grid.list-view .offense-card {
  border-radius: 8px !important;
  padding: 8px 15px !important;
}

.theme-cyberpunk {
  --accent: #fce700;
  --accent-secondary: #ff003c;
  --bg-main: rgba(20, 15, 20, var(--window-opacity, 0.95));
}
.theme-forest {
  --accent: #22c55e;
  --accent-secondary: #14532d;
  --bg-main: rgba(15, 25, 20, var(--window-opacity, 0.95));
}
.theme-sunrise {
  --accent: #f59e0b;
  --accent-secondary: #ea580c;
  --bg-main: rgba(25, 20, 15, var(--window-opacity, 0.95));
}

:root {
  --window-opacity: 1.0;
}
.app-container {
  background: var(--bg-tint, rgba(15,20,35, var(--window-opacity))) !important;
}

.settings-modal {
    /* removed scale */
}

/* ===== TOOLS TAB PREMIUM DESIGN ===== */
.tools-tab .tools-grid {
    gap: 20px !important;
}

.tools-tab .tool-section {
    background: rgba(15, 20, 35, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    backdrop-filter: blur(20px) !important;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.tools-tab .tool-section:hover {
    border-color: rgba(var(--accent-rgb, 0,210,255), 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--accent-rgb, 0,210,255), 0.05) !important;
    transform: translateY(-2px) !important;
}

.tools-tab .tool-section h3 {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tools-tab .tool-section h3 i {
    color: var(--accent, #00d4ff);
    margin-right: 6px;
}

/* Funkcodes */
.tools-tab .funkcodes-list {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px !important;
}

.tools-tab .funkcode-row {
    padding: 8px 12px !important;
    border-radius: 6px;
    border-bottom: none !important;
    margin-bottom: 2px;
    transition: background 0.15s ease;
}

.tools-tab .funkcode-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tools-tab .funkcode-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Timer */
.tools-tab .timer-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 3rem !important;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(var(--accent-rgb, 0,210,255), 0.4);
}

.tools-tab .timer-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tools-tab .timer-buttons .btn-secondary:hover {
    background: rgba(var(--accent-rgb, 0,210,255), 0.15) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* Abschlepprechner */
.tools-tab .abschlepp-section select,
.tools-tab .abschlepp-section input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    transition: border-color 0.2s ease;
}

.tools-tab .abschlepp-section select:focus,
.tools-tab .abschlepp-section input:focus {
    border-color: var(--accent) !important;
    outline: none;
    box-shadow: 0 0 8px rgba(var(--accent-rgb, 0,210,255), 0.15);
}

.tools-tab .akte-box {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: border-color 0.2s;
}

.tools-tab .akte-box:hover {
    border-color: var(--accent) !important;
}

/* Notizen */
.tools-tab .tools-notes textarea {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 14px !important;
    font-size: 0.9rem !important;
    line-height: 1.6;
    transition: border-color 0.2s ease;
}

.tools-tab .tools-notes textarea:focus {
    border-color: var(--accent) !important;
    outline: none;
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 0,210,255), 0.1);
}

/* Buttons in Tools */
.tools-tab .btn-primary {
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

.tools-tab .btn-secondary.btn-full,
.tools-tab .btn-primary.btn-full {
    border-radius: 8px !important;
    padding: 12px !important;
    font-weight: 600 !important;
}


/* ===== GESETZBUCH BEAUTIFICATION ===== */
mark.gesetz-highlight {
    background: rgba(255, 193, 7, 0.35) !important;
    color: inherit !important;
    padding: 1px 2px;
    border-radius: 3px;
    transition: background 0.2s ease;
}
mark.gesetz-highlight-active {
    background: rgba(255, 193, 7, 0.8) !important;
    color: #000 !important;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
    outline: 2px solid rgba(255, 193, 7, 0.6);
}

.gesetzbuch-content * {
    background-color: transparent !important;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
}

.gesetzbuch-content a {
    position: relative !important;
    z-index: 10 !important;
    background: var(--bg-main) !important;
}

.settings-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0,0,0,0.85) !important;
}

.gesetzbuch-content p,
.gesetzbuch-content span,
.gesetzbuch-content li,
.gesetzbuch-content td,
.gesetzbuch-content th {
    color: var(--text-primary, #e0e0e0) !important;
    line-height: 1.7 !important;
    font-size: 0.95rem !important;
}

.gesetzbuch-content h1,
.gesetzbuch-content h2,
.gesetzbuch-content h3,
.gesetzbuch-content h4,
.gesetzbuch-content h5 {
    color: var(--accent, #00d4ff) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    font-weight: 600 !important;
}

.gesetzbuch-content h1 { font-size: 1.5rem !important; }
.gesetzbuch-content h2 { font-size: 1.3rem !important; }
.gesetzbuch-content h3 { font-size: 1.15rem !important; }

.gesetzbuch-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 12px 0 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.gesetzbuch-content td,
.gesetzbuch-content th {
    border: 1px solid rgba(255,255,255,0.08) !important;
    padding: 8px 12px !important;
}

.gesetzbuch-content tr:nth-child(even) {
    background: rgba(255,255,255,0.03) !important;
}

.gesetzbuch-content tr:hover {
    background: rgba(255,255,255,0.06) !important;
}

.gesetzbuch-content ul,
.gesetzbuch-content ol {
    padding-left: 24px !important;
    margin: 8px 0 !important;
}

.gesetzbuch-content li {
    margin: 4px 0 !important;
}

.gesetzbuch-content a {
    color: var(--accent, #00d4ff) !important;
    text-decoration: none !important;
}
.gesetzbuch-content a:hover {
    text-decoration: underline !important;
}

.gesetzbuch-content b,
.gesetzbuch-content strong {
    color: #fff !important;
    font-weight: 600 !important;
}

.gesetzbuch-content hr {
    border: none !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent) !important;
    margin: 20px 0 !important;
}

.gesetz-search-box:focus-within {
    border-color: var(--accent, #00d4ff) !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
}

.gesetzbuch-body-area {
    scroll-behavior: smooth;
}
