/* Visually hidden class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Default Light Theme Styles for template (header, footer, settings menu) */
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;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Added to prevent scrolling when a panel is open */
body.panel-open {
    overflow: hidden;
}

/* 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;
}

.main-content-area {
    background-color: #FFFFFF; /* white */
    transition: background-color 0.3s ease;
}
header.app-header {
    background-color: #E2E8F0; /* slate-200 */
    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 */
    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(.page-nav-icon-svg) {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    margin-right: 0.5rem;
    /* Default color, will be overridden by specific section colors */
    color: #0284C7; /* sky-600 */
}
.nav-dropdown-item .theme-checkmark svg {
     color: #0ea5e9; /* sky-500 */
}
.nav-dropdown-item:hover {
    background-color: #E2E8F0; /* slate-200 */
    color: #0369A1; /* sky-700 */
}

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 70% opacity */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: relative; /* Ensure footer content is layered above the canvas */
    z-index: 10; /* Ensure footer is above particles */
}

body.animations-disabled footer {
    background-color: #E2E8F0; /* slate-200 */
    border-top-color: #CBD5E1; /* slate-300 */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}


.footer-text-secondary { color: #64748B; /* slate-500 */ }

.site-logo { height: 32px; width: auto; margin-right: 0.5rem; }
.settings-divider { border-top: 1px solid #CBD5E1; /* slate-300 */ 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-checkbox:disabled + .toggle-switch-slider { background-color: #9CA3AF; cursor: not-allowed; }
.toggle-switch-checkbox:disabled + .toggle-switch-slider::before { background-color: #E5E7EB; }
#animations-toggle-link.disabled-link { opacity: 0.5; cursor: not-allowed; }


.toggle-switch-slider { width: 2.5rem; height: 1.25rem; background-color: #D1D5DB; /* gray-300 */ 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; /* blue-600 */ }
.toggle-switch-checkbox:checked + .toggle-switch-slider::before { transform: translateX(1.25rem); }

.header-icon { color: #334155; /* slate-700 */ transition: color 0.2s ease-in-out; }
.header-icon:hover { color: #0EA5E9; /* sky-500 */ }
.header-icon svg { fill: currentColor; }
.header-icon svg.stroked-icon { fill: none; stroke: currentColor; }

#settings-button:hover { background-color: #E2E8F0; /* slate-200 */ }

/* Dark Mode Overrides for template */
html.dark body { background-color: #0F172A; color: #F8FAFC; }
html.dark .main-content-area { background-color: #1E293B; /* slate-800 */ }
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(.page-nav-icon-svg) { color: #38BDF8; }
html.dark .nav-dropdown-item .theme-checkmark svg { color: #38bdf8; }
html.dark .nav-dropdown-item:hover { background-color: #334155; color: #38BDF8; }
html.dark footer {
    background-color: rgba(30, 41, 59, 0.7); /* slate-800 with 70% opacity */
    border-top-color: #334155; /* slate-700 */
}
html.dark .footer-text-secondary { color: #94A3B8; }
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 .toggle-switch-checkbox:disabled + .toggle-switch-slider { background-color: #374151; }
html.dark .toggle-switch-checkbox:disabled + .toggle-switch-slider::before { background-color: #4B5563; }
html.dark .header-icon { color: #CBD5E1; }
html.dark .header-icon:hover { color: #38BDF8; }
html.dark #settings-button:hover { background-color: #334155; }

/* Specific dark mode text color overrides */
html.dark .text-slate-900 { color: #F8FAFC; }
html.dark .text-slate-500 { color: #cbd5e1; }
html.dark .text-slate-600 { color: #e2e8f0; }
html.dark .text-slate-700 { color: #cbd5e1; }
html.dark .text-slate-800 { color: #e2e8f0; }
html.dark .text-red-600 { color: #f87171; } /* red-400 */
html.dark .text-blue-600 { color: #60a5fa; } /* blue-400 */
html.dark .text-orange-600 { color: #fb923c; } /* orange-400 */
html.dark .text-yellow-600 { color: #facc15; } /* yellow-400 */
html.dark .text-green-600 { color: #4ade80; } /* green-400 */
html.dark .text-sky-600 { color: #38bdf8; } /* sky-400 */

.theme-checkmark svg {
    color: #0ea5e9; /* sky-500 */
}
html.dark .theme-checkmark svg {
    color: #38bdf8; /* sky-400 */
}

.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; }
}
.animations-icon-svg:not(.animate-active) { stroke: #bd10e0; }
html.dark .animations-icon-svg:not(.animate-active) { stroke: #d946ef; }

/* === SIDE PANEL STYLES START === */
.panel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 70;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.panel-overlay.active { opacity: 1; visibility: visible; }

.side-panel {
    position: fixed; top: 0; height: 100%; width: 90vw; max-width: 420px;
    background-color: #FFFFFF; z-index: 80;
    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; }

.side-panel.left { left: 0; transform: translateX(-100%); }
.side-panel.right { right: 0; transform: translateX(100%); }
.side-panel.open { transform: translateX(0); }

.side-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; border-bottom: 1px solid #E2E8F0;
}
html.dark .side-panel-header { border-bottom-color: #334155; }

.side-panel-title { font-size: 1.375rem; font-weight: 600; color: #1E293B; }
html.dark .side-panel-title { color: #E2E8F0; }

.panel-close-button {
    background: none; border: none; cursor: pointer; padding: 0.5rem;
    color: #64748B; transition: color 0.2s ease, transform 0.2s ease;
}
.panel-close-button:hover { color: #EF4444; transform: rotate(90deg); }
html.dark .panel-close-button { color: #94A3B8; }
html.dark .panel-close-button:hover { color: #F87171; }

.side-panel-content { padding: 0.5rem 0; flex-grow: 1; }
.side-panel .nav-dropdown-item { font-size: 1rem; padding: 0.75rem 1.5rem; }
.side-panel .dropdown-menu-header-text {
    font-size: 0.875rem; font-weight: 600; padding: 0.75rem 1.5rem 0.5rem;
}

#menu-button { margin-right: 0.5rem; }
/* === SIDE PANEL STYLES END === */


/* === SRI PAGE SPECIFIC STYLES START === */
.sri-content-background {
    background-color: #F1F5F9;
    transition: background-color 0.3s ease;
}
html.dark .sri-content-background { background-color: #1E293B; }

textarea::-webkit-scrollbar { width: 8px; }
textarea::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
html.dark textarea::-webkit-scrollbar-track { background: #374151; }
textarea::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
html.dark textarea::-webkit-scrollbar-thumb { background: #6b7280; }
textarea::-webkit-scrollbar-thumb:hover { background: #555; }
html.dark textarea::-webkit-scrollbar-thumb:hover { background: #4b5563; }

@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.5rem;
    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;
}
body.animations-disabled .animated-rainbow-border-container {
    animation: none !important; background: transparent !important;
    border: 2px solid #dc2626; padding: 1px; box-shadow: none !important;
}
html.dark body.animations-disabled .animated-rainbow-border-container { border-color: #f87171; }

.feedback-inner-content {
    border-radius: calc(0.5rem - 3px); width: 100%;
    background-color: #ffffff; transition: background-color 0.3s ease;
}
body.animations-disabled .feedback-inner-content { border-radius: calc(0.5rem - 2px); }
html.dark .feedback-inner-content { background-color: #1E293B; }

#sri-status-message {
    min-height: 1.5rem; margin-top: 0.5rem; text-align: center;
    font-size: 0.875rem; transition: opacity 0.3s ease-in-out;
}

.sri-hash-container {
    background-color: #FFFFFF; padding: 1.5rem; border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    width: 100%;
}
html.dark .sri-hash-container { background-color: #1F2937; }
.sri-hash-container .page-title-icon {
    width: 3rem; height: 3rem; margin-left: auto; margin-right: auto; margin-bottom: 0.75rem;
}
.sri-hash-container h1 {
    font-size: 1.5rem; line-height: 2rem; font-weight: 700;
    text-align: center; margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
    .sri-hash-container { padding: 2rem; }
    .sri-hash-container h1 { font-size: 1.875rem; line-height: 2.25rem; margin-bottom: 2rem; }
}

.sri-hash-container input[type="url"]#resourceUrl,
.sri-hash-container select#hashAlgo {
    padding: 0.75rem; border: 1px solid #2563EB; border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    transition: ring 0.15s ease-in-out, border-color 0.15s ease-in-out, background-color 0.3s ease, color 0.3s ease;
    background-color: #EFF6FF; color: #1E3A8A;
}
.sri-hash-container input[type="url"]#resourceUrl::placeholder { color: #60A5FA; }
.sri-hash-container input[type="url"]#resourceUrl:focus,
.sri-hash-container select#hashAlgo:focus {
    outline: 2px solid transparent; outline-offset: 2px;
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
    --tw-ring-color: #2563EB; border-color: #2563EB;
}
html.dark .sri-hash-container input[type="url"]#resourceUrl,
html.dark .sri-hash-container select#hashAlgo { 
    background-color: #1E3A8A; border-color: #3B82F6; color: #BFDBFE;
}
html.dark .sri-hash-container input[type="url"]#resourceUrl::placeholder { color: #93C5FD; }
html.dark .sri-hash-container input[type="url"]#resourceUrl:focus,
html.dark .sri-hash-container select#hashAlgo:focus {
    --tw-ring-color: #3B82F6; border-color: #3B82F6;
}

#outputAreaWrapper.animated-rainbow-border-container { border-radius: 0.5rem; }
#outputAreaWrapper .feedback-inner-content { border-radius: calc(0.5rem - 3px); padding: 0; }
#outputAreaWrapper.animations-disabled .feedback-inner-content { border-radius: calc(0.5rem - 2px); }
.sri-hash-container textarea#outputArea {
    width: 100%; height: 8rem; padding: 0.75rem;
    font-size: 0.875rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    resize: none; background-color: transparent; color: inherit; border: none; outline: none;
    transition: box-shadow 0.15s ease-in-out;
}
.sri-hash-container textarea#outputArea:focus { box-shadow: 0 0 0 2px #4F46E5; }
html.dark .sri-hash-container textarea#outputArea { color: #F3F4F6; }
html.dark .sri-hash-container textarea#outputArea::placeholder { color: #9CA3AF; }

.info-section {
    margin-top: 3rem; padding: 2rem 1rem; border-radius: 0.75rem;
    background-color: #E0F2FE;
}
html.dark .info-section { background-color: #0C4A6E; }
.info-card {
    background-color: #FFFFFF; border-radius: 0.5rem; padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out;
}
.info-card:hover { transform: translateY(-5px); }
html.dark .info-card { background-color: #0369A1; color: #E0F2FE; }
.info-card h3 {
    font-size: 1.25rem; font-weight: 600; color: #0284C7;
    margin-bottom: 0.75rem; display: flex; align-items: center;
}
html.dark .info-card h3 { color: #7DD3FC; }
.info-card h3 .info-icon { margin-right: 0.5rem; color: #0EA5E9; }
html.dark .info-card h3 .info-icon { color: #A5B4FC; }
.info-card p { font-size: 0.95rem; line-height: 1.6; }
html.dark .info-card p { color: #E0F2FE; }
.info-card strong { color: #075985; }
html.dark .info-card strong { color: #F0F9FF; }

