/* Default Light Theme Styles (Base) */
body {
    font-family: 'Inter', sans-serif;
    background-color: #F1F5F9; /* slate-100 */
    color: #0F172A; /* slate-900 */
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Prevent horizontal scroll on body */
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Added to prevent scrolling when a panel is open */
body.panel-open {
    overflow: hidden;
}


/* For disabling analysis sections */
.analysis-disabled {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Particle Canvas Styles */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place it behind all other content */
    pointer-events: none; /* Make it non-interactive */
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

/* Hide particle canvas when animations are disabled */
body.animations-disabled #particle-canvas {
    opacity: 0;
    display: none;
}

header.app-header { 
    background-color: #E2E8F0; /* slate-200 (Light Mode Default) */
    transition: background-color 0.3s ease;
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; /* text-sm */
    color: #1E293B; /* slate-800 (Light Mode Default) */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.nav-dropdown-item svg:not([class*="text-"]):not(#animations-menu-icon-svg):not(.check-icon) { 
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    color: #0284C7; /* sky-600 */
}
.nav-dropdown-item .theme-checkmark svg {
     color: #0ea5e9; /* sky-500 */
}

.nav-dropdown-item:hover {
    background-color: #E2E8F0; /* slate-200 (Light Mode Default hover) */
    color: #0369A1; /* sky-700 (Light Mode Default hover) */
}
.dropdown-menu {
    background-color: #FFFFFF; /* white (Light Mode Default) */
    color: #1E293B; /* slate-800 (Light Mode Default) */
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
    width: 90vw;
    max-width: 40rem;
}
@media (min-width: 640px) { /* sm breakpoint in Tailwind */
    .dropdown-menu {
        width: 40rem; 
    }
}

#settings-dropdown .nav-dropdown-item:hover {
    background-color: #F3F4F6; /* gray-100 (Light Mode Default hover) */
}
.dropdown-menu-header-text { color: #6B7280; /* gray-500 (Light Mode Default) */ }
.dropdown-menu-item-text { color: #111827; /* gray-900 (Light Mode Default) */ }

main {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%; 
}

footer {
    border-top-color: transparent; /* Made transparent for particle effect */
    transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    background-color: rgba(226, 232, 240, 0.25); /* slate-200 with 25% opacity */
    backdrop-filter: blur(5px);
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: relative; /* Ensure footer content is layered above the canvas */
    z-index: 10;
}

body.animations-disabled footer {
    background-color: #E2E8F0; /* slate-200 */
    border-top-color: #CBD5E1; /* slate-300 */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html.dark body.animations-disabled footer {
    background-color: #1E293B; /* slate-800 */
    border-top-color: #334155; /* slate-700 */
}


.footer-text-secondary { color: #64748B; /* slate-500 */ }

.site-logo { height: 28px; sm:height: 32px; width: auto; margin-right: 0.25rem; sm:margin-right: 0.5rem; } 
.pag-title-icon { width: 2.5rem; height: 2.5rem; sm:width: 3.5rem; sm:height: 3.5rem; } 

.pag-section-title-main, .pag-label-style, .disclaimer-label-red {
    font-size: 1rem; 
    font-weight: 600;
}

@media (min-width: 640px) { 
    .pag-section-title-main, .pag-label-style, .disclaimer-label-red {
        font-size: 1.125rem; 
    }
}
.pag-section-title-main { margin-bottom: 0.5rem; sm:margin-bottom: 0.75rem; text-align: center; }

.disclaimer-label-red {
    color: #EF4444; 
    margin-bottom: 0.75rem; 
}
.disclaimer-label-red svg { 
    width: 1.5rem; 
    height: 1.5rem; 
    margin-right: 0.5rem; 
    color: #EF4444; 
}
html.dark .disclaimer-label-red {
    color: #F87171 !important; 
}
html.dark .disclaimer-label-red svg {
    color: #F87171 !important; 
}

label[for="hibp-toggle-checkbox-input"] span {
    color: #EF4444;
}
html.dark label[for="hibp-toggle-checkbox-input"] span {
    color: #F87171 !important; 
}

.pag-input-icon { cursor: pointer; color: #4B5563; transition: color 0.2s ease-in-out; }
.pag-input-icon:hover { color: #2563EB; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.pag-arrow-btn-container { opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out; }
.number-input-wrapper:hover .pag-arrow-btn-container,
.number-input-wrapper input[type=number]:focus + .pag-arrow-btn-container { opacity: 1; visibility: visible; }
.pag-arrow-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 50%; color: #4B5563; background-color: #E5E7EB; border-left: 1px solid #9CA3AF; }
.pag-arrow-btn:hover { background-color: #D1D5DB; }
.pag-arrow-btn:first-child { border-bottom: 1px solid #9CA3AF; }

.pag-checklist-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.pag-checklist-item.unmet {
    color: #EF4444; 
}
html.dark .pag-checklist-item.unmet {
    color: #F87171; 
}

.pag-checklist-item.completed {
    color: #22C55E;
}
html.dark .pag-checklist-item.completed {
    color: #4ADE80;
}

.pag-checklist-item svg.check-icon {
    width: 1rem;
    height: 1rem; 
    margin-right: 0.375rem; 
    flex-shrink: 0;
    stroke: currentColor; 
}

.pag-entropy-legend-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem; 
}
@media (min-width: 640px) { 
    .pag-entropy-legend-item {
        font-size: 1rem; 
    }
}
.pag-entropy-legend-color { width: 0.625rem; height: 0.625rem; sm:width: 0.75rem; sm:height: 0.75rem; border-radius: 9999px; margin-right: 0.25rem; border: 1px solid #D1D5DB; }

.info-icon-pag { width: 0.875rem; height: 0.875rem; sm:width: 1rem; sm:height: 1rem; margin-left: 0.25rem; color: #2563EB; cursor: help; } 
.settings-divider { border-top: 1px solid #CBD5E1; margin-top: 0.25rem; margin-bottom: 0.25rem; }

.toggle-switch-label { display: flex; align-items: center; cursor: pointer; }
.toggle-switch-checkbox { opacity: 0; width: 0; height: 0; }
.toggle-switch-slider { width: 2.5rem; height: 1.25rem; background-color: #D1D5DB; border-radius: 9999px; position: relative; transition: background-color 0.2s ease-in-out; }
.toggle-switch-slider::before { content: ''; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; background-color: white; border-radius: 9999px; transition: transform 0.2s ease-in-out; }
.toggle-switch-checkbox:checked + .toggle-switch-slider { background-color: #2563EB; }
.toggle-switch-checkbox:checked + .toggle-switch-slider::before { transform: translateX(1.25rem); }

.header-icon { color: #334155; transition: color 0.2s ease-in-out; }
.header-icon:hover { color: #0EA5E9; }
.header-icon svg { fill: currentColor; }
#settings-button:hover { background-color: #E2E8F0; }

.generate-btn-common:disabled {
    background-color: #94A3B8; 
    color: #E2E8F0;
    cursor: not-allowed;
    opacity: 0.7;
}
html.dark .generate-btn-common:disabled {
    background-color: #475569;
    color: #94A3B8; 
}

.external-link-icon {
    display: inline-block;
    width: 0.8em; 
    height: 0.8em;
    margin-left: 0.2em;
    vertical-align: baseline; 
}

/* Dark Mode Overrides */
html.dark body { background-color: #0F172A; color: #F8FAFC; }
html.dark header.app-header { background-color: #1E293B; } 
html.dark .nav-dropdown-item { color: #CBD5E1; }
html.dark .nav-dropdown-item svg:not([class*="text-"]):not(#animations-menu-icon-svg):not(.check-icon) { color: #0284C7; }

html.dark .nav-dropdown-item .theme-checkmark svg { color: #38bdf8; }
html.dark .nav-dropdown-item:hover { background-color: #334155; color: #38BDF8; }
html.dark .dropdown-menu { background-color: #1E293B; color: #F8FAFC; }
html.dark #settings-dropdown .nav-dropdown-item:hover { background-color: #334155; }
html.dark .dropdown-menu-header-text { color: #94A3B8; }
html.dark .dropdown-menu-item-text { color: #E2E8F0; }

html.dark footer { 
    background-color: rgba(30, 41, 59, 0.7); /* slate-800 with 70% opacity */
}

html.dark .pag-input-icon { color: #6B7280; }
html.dark .pag-input-icon:hover { color: #3B82F6; }
html.dark .pag-arrow-btn { color: #4B5563; background-color: #E5E7EB; border-left-color: #9CA3AF; }
html.dark .pag-arrow-btn:hover { background-color: #D1D5DB; }
html.dark .pag-arrow-btn:first-child { border-bottom-color: #9CA3AF; }
html.dark .pag-entropy-legend-color { border: 1px solid #4B5563; }
html.dark .info-icon-pag { color: #3B82F6; }
html.dark .settings-divider { border-top-color: #334155; }
html.dark .toggle-switch-slider { background-color: #4B5563; }
html.dark .toggle-switch-checkbox:checked + .toggle-switch-slider { background-color: #3B82F6; }
html.dark .header-icon { color: #CBD5E1; }
html.dark .header-icon:hover { color: #38BDF8; }
html.dark #settings-button:hover { background-color: #334155; }

html.dark .text-center.mb-4 > .pag-title-icon,
html.dark .text-center.mb-4 > h1.text-2xl, 
html.dark .text-center.mb-4 > h1.sm\:text-3xl {
    color: #7DD3FC !important; /* sky-300 */
}

.pag-label-style { color: #0284C7; transition: color 0.3s ease; }
html.dark .pag-label-style { color: #7DD3FC !important; }

html.dark .pag-section-title-main {
    color: #7DD3FC !important;
}

html.dark .mb-6.sm\:mb-8 .flex.justify-end.items-baseline .flex.items-baseline > p,
html.dark .mb-6.sm\:mb-8 .flex.justify-end.items-baseline .flex.items-baseline > span#char-count {
    color: #7DD3FC !important; 
}

#pp-separator, #pp-wordlist-select {
    border-width: 1px;
    border-style: solid;
    border-color: #0ea5e9; 
}
html.dark #pp-separator, html.dark #pp-wordlist-select {
    border-color: #38bdf8 !important; 
}

@property --rainbow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rainbow-chase-feedback-animation { to { --rainbow-angle: 360deg; } }

@keyframes aura-pulse-effect {
    0%   { box-shadow: 0 0 15px 4px rgba(239, 68, 68, 0.35), 0 0 30px 8px rgba(239, 68, 68, 0.2); }
    17%  { box-shadow: 0 0 15px 4px rgba(249, 115, 22, 0.35), 0 0 30px 8px rgba(249, 115, 22, 0.2); }
    33%  { box-shadow: 0 0 15px 4px rgba(234, 179, 8, 0.35), 0 0 30px 8px rgba(234, 179, 8, 0.2); }
    50%  { box-shadow: 0 0 15px 4px rgba(34, 197, 94, 0.35), 0 0 30px 8px rgba(34, 197, 94, 0.2); }
    67%  { box-shadow: 0 0 15px 4px rgba(59, 130, 246, 0.35), 0 0 30px 8px rgba(59, 130, 246, 0.2); }
    83%  { box-shadow: 0 0 15px 4px rgba(139, 92, 246, 0.35), 0 0 30px 8px rgba(139, 92, 246, 0.2); }
    100% { box-shadow: 0 0 15px 4px rgba(239, 68, 68, 0.35), 0 0 30px 8px rgba(239, 68, 68, 0.2); }
}

.animated-rainbow-border-container {
    padding: 3px;
    border-radius: 0.375rem; 
    background: conic-gradient(from var(--rainbow-angle), #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #6366f1, #8b5cf6, #ef4444);
    animation: rainbow-chase-feedback-animation 3s linear infinite, aura-pulse-effect 6s ease-in-out infinite;
    position: relative;
}
.animated-rainbow-border-container.animations-disabled {
    animation: none !important;
    background: transparent !important;
    border: 2px solid #dc2626;
    padding: 1px;
    box-shadow: none !important;
}
html.dark .animated-rainbow-border-container.animations-disabled {
    border-color: #f87171;
}

.feedback-inner-content {
    border-radius: calc(0.375rem - 3px);
    width: 100%;
    background-color: #F0F9FF;
    transition: background-color 0.3s ease;
}
.animations-disabled .feedback-inner-content {
     border-radius: calc(0.375rem - 2px); 
}
html.dark .feedback-inner-content { background-color: #334155; }

#pagContainer {
    background-color: #FFFFFF;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box; 
}
@media (min-width: 1024px) { 
    #pagContainer {
        max-width: 64rem; 
    }
}

html.dark #pagContainer { background-color: #1E293B; }

.themed-input {
    background-color: #FFFFFF;
    color: #0F172A;
    border-color: #CBD5E1; 
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    padding-left: 0.75rem;
}
.themed-input::placeholder { color: #94A3B8; transition: color 0.3s ease; }

html.dark .themed-input {
    background-color: #334155 !important;
    color: #F1F5F9 !important; 
    border-color: #475569 !important; 
}
html.dark .themed-input::placeholder { color: #64748B !important; }

select.themed-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em 1em;
    padding-right: 2rem;
}

html.dark select.themed-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

.text-slate-700 { color: #334155; }
html.dark .text-slate-700 { color: #cbd5e1 !important; } 

.text-slate-600 { color: #475569; }
html.dark .text-slate-600 { color: #94a3b8 !important; }

#feedback-content #zxcvbn-feedback-area,
#feedback-content #zxcvbn-feedback-area p,
#feedback-content #zxcvbn-feedback-area li { color: #475569; }
#feedback-content #zxcvbn-feedback-area .text-red-600 { color: #dc2626 !important; }

html.dark #feedback-content #zxcvbn-feedback-area,
html.dark #feedback-content #zxcvbn-feedback-area p,
html.dark #feedback-content #zxcvbn-feedback-area li { color: #cbd5e1 !important; }
html.dark #feedback-content #zxcvbn-feedback-area .text-red-600 { color: #f87171 !important; }

.theme-checkmark svg {
    color: #0ea5e9;
}
html.dark .theme-checkmark svg {
    color: #38bdf8;
}

.animations-icon-svg {
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.animations-icon-svg.animate-active {
    animation: explosion-effect 2s infinite ease-in-out,
               rainbow-stroke-wave-direct 3s infinite linear;
}
@keyframes explosion-effect {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.6) rotate(45deg); opacity: 0.7; }
    50% { transform: scale(0.7) rotate(-45deg); opacity: 1; }
    75% { transform: scale(1.3) rotate(15deg); opacity: 0.8; }
}
@keyframes rainbow-stroke-wave-direct {
    0%   { stroke: #FF0000; } 14%  { stroke: #FFA500; } 28%  { stroke: #FFFF00; } 42%  { stroke: #008000; }
    57%  { stroke: #0000FF; } 71%  { stroke: #4B0082; } 85%  { stroke: #EE82EE; } 100% { stroke: #FF0000; }
}
html.dark .animations-icon-svg:not(.animate-active) { stroke: #d946ef; }
.animations-icon-svg:not(.animate-active) { stroke: #bd10e0; }

html.dark div.grid.grid-cols-1.md\:grid-cols-2.gap-6.mb-6 > div:nth-child(1) > div:nth-child(1) .text-slate-700 {
    color: #cbd5e1 !important; 
}
html.dark .disclaimer-label-red {
    color: #F87171 !important;
}

@keyframes glow-pulse-strength-0-light {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.3), 0 0 18px 4px rgba(239, 68, 68, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(239, 68, 68, 0.5), 0 0 30px 8px rgba(239, 68, 68, 0.25); }
}
@keyframes glow-pulse-strength-0-dark {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(248, 113, 113, 0.3), 0 0 18px 4px rgba(248, 113, 113, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(248, 113, 113, 0.5), 0 0 30px 8px rgba(248, 113, 113, 0.25); }
}
.glow-strength-0 {
    animation-name: glow-pulse-strength-0-light;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
html.dark .glow-strength-0 {
    animation-name: glow-pulse-strength-0-dark;
}

@keyframes glow-pulse-strength-1-light {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(249, 115, 22, 0.3), 0 0 18px 4px rgba(249, 115, 22, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(249, 115, 22, 0.5), 0 0 30px 8px rgba(249, 115, 22, 0.25); }
}
@keyframes glow-pulse-strength-1-dark {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(251, 146, 60, 0.3), 0 0 18px 4px rgba(251, 146, 60, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(251, 146, 60, 0.5), 0 0 30px 8px rgba(251, 146, 60, 0.25); }
}
.glow-strength-1 {
    animation-name: glow-pulse-strength-1-light;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
html.dark .glow-strength-1 {
    animation-name: glow-pulse-strength-1-dark;
}

@keyframes glow-pulse-strength-2-light {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(234, 179, 8, 0.3), 0 0 18px 4px rgba(234, 179, 8, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(234, 179, 8, 0.5), 0 0 30px 8px rgba(234, 179, 8, 0.25); }
}
@keyframes glow-pulse-strength-2-dark {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(250, 204, 21, 0.3), 0 0 18px 4px rgba(250, 204, 21, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(250, 204, 21, 0.5), 0 0 30px 8px rgba(250, 204, 21, 0.25); }
}
.glow-strength-2 {
    animation-name: glow-pulse-strength-2-light;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
html.dark .glow-strength-2 {
    animation-name: glow-pulse-strength-2-dark;
}

@keyframes glow-pulse-strength-3-light {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(34, 197, 94, 0.3), 0 0 18px 4px rgba(34, 197, 94, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(34, 197, 94, 0.5), 0 0 30px 8px rgba(34, 197, 94, 0.25); }
}
@keyframes glow-pulse-strength-3-dark {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(74, 222, 128, 0.3), 0 0 18px 4px rgba(74, 222, 128, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(74, 222, 128, 0.5), 0 0 30px 8px rgba(74, 222, 128, 0.25); }
}
.glow-strength-3 {
    animation-name: glow-pulse-strength-3-light;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
html.dark .glow-strength-3 {
    animation-name: glow-pulse-strength-3-dark;
}

@keyframes glow-pulse-strength-4-light {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(14, 165, 233, 0.3), 0 0 18px 4px rgba(14, 165, 233, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(14, 165, 233, 0.5), 0 0 30px 8px rgba(14, 165, 233, 0.25); }
}
@keyframes glow-pulse-strength-4-dark {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(56, 189, 248, 0.3), 0 0 18px 4px rgba(56, 189, 248, 0.15); }
    50% { box-shadow: 0 0 16px 5px rgba(56, 189, 248, 0.5), 0 0 30px 8px rgba(56, 189, 248, 0.25); }
}
.glow-strength-4 {
    animation-name: glow-pulse-strength-4-light;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
html.dark .glow-strength-4 {
    animation-name: glow-pulse-strength-4-dark;
}

.border-strength-0 { border-color: #EF4444 !important; }
html.dark .border-strength-0 { border-color: #F87171 !important; }

.border-strength-1 { border-color: #F97316 !important; }
html.dark .border-strength-1 { border-color: #FB923C !important; }

.border-strength-2 { border-color: #EAB308 !important; }
html.dark .border-strength-2 { border-color: #FACC15 !important; }

.border-strength-3 { border-color: #22C55E !important; }
html.dark .border-strength-3 { border-color: #4ADE80 !important; }

.border-strength-4 { border-color: #0EA5E9 !important; }
html.dark .border-strength-4 { border-color: #38BDF8 !important; }

.bg-strength-0 { background-color: rgba(239, 68, 68, 0.07) !important; }
html.dark .bg-strength-0 { background-color: rgba(239, 68, 68, 0.1) !important; }

.bg-strength-1 { background-color: rgba(249, 115, 22, 0.07) !important; }
html.dark .bg-strength-1 { background-color: rgba(249, 115, 22, 0.1) !important; }

.bg-strength-2 { background-color: rgba(234, 179, 8, 0.07) !important; }
html.dark .bg-strength-2 { background-color: rgba(234, 179, 8, 0.1) !important; }

.bg-strength-3 { background-color: rgba(34, 197, 94, 0.07) !important; }
html.dark .bg-strength-3 { background-color: rgba(34, 197, 94, 0.1) !important; }

.bg-strength-4 { background-color: rgba(14, 165, 233, 0.07) !important; }
html.dark .bg-strength-4 { background-color: rgba(14, 165, 233, 0.1) !important; }

#pwa-install-banner.show {
    transform: translateY(0);
}

.password-input-container {
    position: relative;
}

#password,
#password-styled-display {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
    height: auto;
    min-height: 3rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    #password,
    #password-styled-display {
        font-size: 2.25rem !important;
        min-height: 3.5rem;
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }
}

#password-styled-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    white-space: normal; 
    overflow-wrap: break-word;
    z-index: 1;
}

#password.input-hidden-behind-styled {
    color: transparent !important;
    background-color: transparent !important;
    caret-color: #0F172A;
    position: relative;
    z-index: 2;
}

html.dark #password.input-hidden-behind-styled {
    caret-color: #F1F5F9;
}

#input-icons {
    z-index: auto;
}


.password-char-lower {
    color: #0F172A;
}
html.dark .password-char-lower {
    color: #F8FAFC;
}
.password-char-upper {
    color: #16a34a; /* Tailwind green-600 */
}
html.dark .password-char-upper {
    color: #4ade80; /* Tailwind green-400 */
}
.password-char-number {
    color: #2563EB;
}
html.dark .password-char-number {
    color: #60A5FA;
}
.password-char-symbol { 
    color: #DC2626;
}
html.dark .password-char-symbol { 
    color: #F87171;
}

.advanced-options-toggle:hover {
    background-color: #e2e8f0;
}
html.dark .advanced-options-toggle:hover {
    background-color: #334155;
}

.custom-tooltip {
    position: absolute;
    background-color: #1F2937;
    color: #F9FAFB; 
    padding: 0.5rem 0.75rem; 
    border-radius: 0.375rem;
    font-size: 0.75rem; 
    line-height: 1rem;
    z-index: 60; 
    opacity: 0;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform: translateY(0.5rem); 
    pointer-events: none; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.custom-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

html.dark .custom-tooltip {
    background-color: #E2E8F0;
    color: #1E293B;
}

html.dark .advanced-options-toggle h4 {
    color: #FFFFFF !important;
}

html.dark .advanced-options-toggle .advanced-options-icon {
    color: #FFFFFF !important;
}

/* Position D3 chart tooltip above other content */
#tooltip {
    z-index: 50;
}

/* Custom styles for the Pin slider */
.pin-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background-color: #CBD5E1; /* slate-300 */
    border-radius: 4px;
    outline: none;
    transition: background-color 0.3s ease;
}
html.dark .pin-slider {
    background-color: #475569; /* slate-600 */
}

/* Slider Thumb */
.pin-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: #0EA5E9; /* sky-500 */
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}
html.dark .pin-slider::-webkit-slider-thumb {
    background-color: #38BDF8; /* sky-400 */
    border-color: #1E293B; /* slate-800 */
}

.pin-slider::-moz-range-thumb {
    width: 18px; /* Slightly smaller to account for no border in some FF versions */
    height: 18px;
    background-color: #0EA5E9; /* sky-500 */
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}
html.dark .pin-slider::-moz-range-thumb {
    background-color: #38BDF8; /* sky-400 */
    border-color: #1E293B; /* slate-800 */
}

/* --- NEW STYLES FOR SIDE PANELS --- */

/* Overlay for when the panel is open */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 70; /* Higher than header, lower than panel */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Base styles for both side panels */
.side-panel {
    position: fixed;
    top: 0;
    height: 100%;
    width: 90vw;
    max-width: 320px;
    background-color: #FFFFFF; /* Light mode default */
    z-index: 80; /* Highest z-index */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

html.dark .side-panel {
    background-color: #1E293B; /* Dark mode background */
}

/* Left-side panel initial state (off-screen) */
.side-panel.left {
    left: 0;
    transform: translateX(-100%);
}

/* Right-side panel initial state (off-screen) */
.side-panel.right {
    right: 0;
    transform: translateX(100%);
}

/* State when the panel is open (on-screen) */
.side-panel.open {
    transform: translateX(0);
}

/* Header within the side panel */
.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #E2E8F0; /* Light mode border */
}

html.dark .side-panel-header {
    border-bottom-color: #334155; /* Dark mode border */
}

.side-panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1E293B; /* Light mode text */
}

html.dark .side-panel-title {
    color: #E2E8F0; /* Dark mode text */
}

/* Close button inside the panel */
.panel-close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748B; /* Light mode icon color */
    transition: color 0.2s ease, transform 0.2s ease;
}

.panel-close-button:hover {
    color: #EF4444; /* Red on hover */
    transform: rotate(90deg);
}

html.dark .panel-close-button {
    color: #94A3B8; /* Dark mode icon color */
}

html.dark .panel-close-button:hover {
    color: #F87171; /* Light red on hover */
}

/* Content area of the side panel */
.side-panel-content {
    padding: 0.5rem 0;
    flex-grow: 1;
}

/* The new hamburger menu icon button */
#menu-button {
    margin-right: 0.5rem; /* Add some space between it and the logo */
}
