/* Fydler UtilityBelt - Vanilla CSS Styles */

:root {
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;
    --bg-gray-50: #f9fafb;
    --text-gray-800: #1f2937;
    --text-gray-600: #4b5563;
    --text-gray-400: #9ca3af;
    --border-gray-200: #e5e7eb;
    --primary: #1f2937;
    --primary-hover: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: var(--bg-gray-100);
    color: var(--text-gray-800);
    line-height: 1.5;
}

.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }

/* Layout */
header.mobile-header {
    display: flex;
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--border-gray-200);
    position: sticky;
    top: 0;
    z-index: 30;
}

@media (min-width: 1024px) {
    header.mobile-header { display: none; }
}

#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
    display: none;
}

.sidebar-checkbox:checked ~ #sidebar-overlay { display: block; }

aside.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: 16rem;
    background: var(--white);
    border-right: 1px solid var(--border-gray-200);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

@media (min-width: 1024px) {
    aside.sidebar {
        transform: translateX(0);
        position: static;
    }
}

.sidebar-checkbox:checked ~ .flex aside.sidebar { transform: translateX(0); }

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-logo {
    display: none;
    padding: 1.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .sidebar-logo { display: flex; }
}

.logo-container {
    padding: 0.5rem;
    background: var(--text-gray-600);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-mobile-title {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray-200);
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 1024px) {
    .sidebar-mobile-title { display: none; }
}

nav.sidebar-nav {
    flex: 1;
    padding: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xl);
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-gray-600);
    font-weight: 500;
}

.nav-item:hover {
    background-color: var(--bg-gray-100);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

main.main-content {
    flex: 1;
    padding: 1rem;
    overflow-x: hidden;
}

@media (min-width: 1024px) {
    main.main-content { padding: 2rem; }
}

.max-w-5xl {
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
}

/* Components */
.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-gray-200);
    transition: transform 0.2s, shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

@media (min-width: 1024px) {
    .card.p-8 { padding: 2rem; }
}

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1x)); }
@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: var(--radius-xl);
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    width: 100%;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--bg-gray-50);
}

.input, .select, .textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-gray-200);
    background-color: var(--bg-gray-50);
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.input:focus, .select:focus, .textarea:focus {
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.5);
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray-600);
    margin-bottom: 0.5rem;
}

.result-box {
    padding: 1rem;
    background-color: var(--bg-gray-50);
    border-radius: var(--radius-xl);
    position: relative;
    border: 1px solid var(--border-gray-200);
}

.result-label {
    font-size: 0.75rem;
    font-bold: bold;
    color: var(--text-gray-400);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.break-all { word-break: break-all; }
.select-all { user-select: all; }
.font-bold { font-weight: bold; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }

.text-gray-600 { color: var(--text-gray-600); }
.text-gray-700 { color: var(--text-gray-700); }
.text-gray-800 { color: var(--text-gray-800); }
.text-gray-900 { color: var(--text-gray-900); }
.text-white { color: var(--white); }

.bg-white { background-color: var(--white); }
.bg-gray-100 { background-color: var(--bg-gray-100); }
.bg-gray-50 { background-color: var(--bg-gray-50); }
.bg-gray-200 { background-color: var(--bg-gray-200); }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

.border { border: 1px solid var(--border-gray-200); }
.border-b { border-bottom: 1px solid var(--border-gray-200); }

.hidden { display: none; }
.block { display: block; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-30 { z-index: 30; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.leading-relaxed { line-height: 1.625; }

/* Toast */
#toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(6rem);
    transition: transform 0.3s;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#toast.show {
    transform: translateY(0);
}

.text-green-400 { color: #4ade80; }

/* AdSense */
.ads-container {
    margin: 1.5rem 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* Specific tools */
.argon2-params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.argon2-params-grid.hidden { display: none; }

.verify-result {
    padding: 1.5rem;
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.verify-result.success {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.verify-result.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.bg-gradient-title {
    background: linear-gradient(to right, #374151, #111827);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.list-disc { list-style-type: disc; }
.ml-5 { margin-left: 1.25rem; }

pre { white-space: pre-wrap; }

/* Cookie Consent Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}

.cookie-consent-text {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.cookie-consent-link {
    color: #93c5fd;
    text-decoration: underline;
}

.cookie-consent-link:hover {
    color: #bfdbfe;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    width: auto;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.cookie-btn-reject {
    background: transparent;
    border: 1px solid #6b7280;
    color: #d1d5db;
}

.cookie-btn-reject:hover {
    background: #374151;
}

@media (max-width: 640px) {
    #cookie-consent-banner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
}
