:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #e5e7eb;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --tag-bg: #e5e7eb;
    --border-color: #e5e7eb;
    --border-radius: 16px;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --error-border: #fca5a5;
    --success: #10b981;
    --warning: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    z-index: 102;
    flex-shrink: 0;
}
.logo span { color: var(--text-main); }

.nav-links { display: flex; gap: 2rem; list-style: none; padding-bottom: 0; margin: 0; }
.nav-link { color: var(--text-sub); text-decoration: none; font-weight: 500; transition: color 0.2s; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--primary-color); }

@media (max-width: 900px) {
    .header { padding: 1rem; }
    .logo { font-size: 1.25rem; }
    .nav-links { display: none; }
}

/* --- Main Layout --- */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tool-section { display: block; animation: fadeIn 0.3s ease-in-out; }

/* SEO Content Section */
.seo-content {
    max-width: 800px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
    color: var(--text-main);
}
.seo-content h2 { margin-bottom: 1rem; font-size: 1.5rem; color: var(--text-main); }
.seo-content h3 { margin-bottom: 0.75rem; font-size: 1.25rem; color: var(--text-main); margin-top: 1.5rem; }
.seo-content p { margin-bottom: 1rem; color: var(--text-sub); }
.seo-content ul { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--text-sub); }

/* --- Tools Grid --- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.hero-text { text-align: center; margin-bottom: 3rem; max-width: 700px; margin-left: auto; margin-right: auto; padding: 0 1rem; }
.hero-text h1 { font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 1rem; }
.hero-text p { font-size: 1.1rem; color: var(--text-sub); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Cards --- */
.tool-card {
    background: var(--card-bg); padding: 1.5rem; border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); cursor: pointer;
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem;
    text-decoration: none; 
    transition: all 0.3s ease; border: 1px solid transparent;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); }
.tool-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--text-main); }
.tool-description { font-size: 0.9rem; color: var(--text-sub); font-weight: 500; line-height: 1.4; }

/* Icon Wrappers */
.tool-icon-wrapper { width: 52px; height: 52px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tool-icon-svg { width: 26px; height: 26px; color: white; stroke-width: 2px; }
.icon-bg-blue { background-color: #3b82f6; }
.icon-bg-orange { background-color: #f97316; }
.icon-bg-purple { background-color: #a855f7; }
.icon-bg-green { background-color: #22c55e; }
.icon-bg-red { background-color: #ef4444; }
.icon-bg-teal { background-color: #14b8a6; }
.icon-bg-yellow { background-color: #eab308; }
.icon-bg-pink { background-color: #ec4899; }
.icon-bg-dark { background-color: #1f2937; }

/* --- Shared Tool Layouts --- */
.tool-container { max-width: 800px; margin: 0 auto; background: var(--card-bg); padding: 2.5rem; border-radius: var(--border-radius); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); width: 100%; }
.back-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-sub); text-decoration: none; font-weight: 500; margin-bottom: 1.5rem; transition: color 0.2s; cursor: pointer; }
.back-btn:hover { color: var(--primary-color); }
.hidden { display: none !important; }

/* Upload Areas */
.upload-area { border: 2px dashed #d1d5db; border-radius: 12px; padding: 3rem 1.5rem; cursor: pointer; text-align: center; transition: all 0.3s ease; background: #f9fafb; margin-bottom: 2rem; }
.upload-area:hover { border-color: var(--primary-color); background: #eff6ff; }
.upload-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }

/* Buttons & Inputs */
.btn-launch { display: block; width: 100%; padding: 1rem; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; }
.btn-launch:hover { background-color: var(--primary-hover); }

.btn-reset { background: none; border: none; color: var(--text-sub); text-decoration: underline; cursor: pointer; margin-top: 1rem; display: block; width: 100%; text-align: center; }

.form-control { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem; background: #fff; }
.form-control:focus { outline: none; border-color: var(--primary-color); }
.modern-input { padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; width: 100%; }
.modern-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); outline: none; }

/* --- JPEG Compressor Specifics --- */
.preview-container { margin-bottom: 1.5rem; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); background: #eee; border: 1px solid var(--border-color); }
.preview-img { max-width: 100%; display: block; margin: 0 auto; max-height: 400px; object-fit: contain; }
.controls { background: #f3f4f6; padding: 1.5rem; border-radius: 12px; margin-bottom: 1.5rem; text-align: left; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e5e7eb; }
.stat-box { background: white; padding: 0.75rem; border-radius: 8px; text-align: center; }
.stat-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-sub); }
.stat-value { font-weight: 600; color: var(--text-main); font-size: 1rem; }
.stat-value.highlight { color: var(--primary-color); }

/* --- Image Converter Specifics --- */
.converter-select-wrapper { margin-bottom: 2rem; }
.converter-select { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); font-size: 1rem; margin-top: 5px; }

/* --- TWEET GENERATOR CSS --- */
.tweet-tool-wrapper { display: grid; grid-template-columns: 350px 1fr; gap: 30px; background: var(--card-bg); padding: 30px; border-radius: var(--border-radius); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); width: 100%; }
.tweet-editor-controls { display: flex; flex-direction: column; gap: 20px; }
.tweet-input-group { display: flex; flex-direction: column; gap: 8px; }
.tweet-input-group label { font-weight: 600; font-size: 0.9rem; }
.tweet-row { display: flex; gap: 15px; }
.tweet-col { flex: 1; }
.theme-toggles { display: flex; background: #f3f4f6; padding: 4px; border-radius: 8px; }
.theme-btn { flex: 1; border: none; background: transparent; padding: 8px; cursor: pointer; border-radius: 6px; font-weight: 500; color: var(--text-sub); }
.theme-btn.active { background: white; color: var(--primary-color); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.grad-options { display: flex; gap: 10px; flex-wrap: wrap; }
.grad-circle { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s; }
.grad-circle.active { border-color: var(--text-main); transform: scale(1.1); }
.tweet-preview-area { background: #e5e7eb; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; min-height: 400px; width: 100%; overflow-x: auto; }
.tweet-capture-container { padding: 60px; width: 100%; max-width: 600px; min-width: 320px; display: flex; align-items: center; justify-content: center; border-radius: 0; box-sizing: border-box; }
.bg-grad-1 { background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%); }
.bg-grad-2 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.bg-grad-3 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.bg-grad-4 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }

/* Modern File Input Button (Tweet Generator) */
.custom-file-wrapper { width: 100%; position: relative; }
.hidden-input { display: none; }
.modern-file-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; background-color: #ffffff; border: 2px solid #e5e7eb; border-radius: 12px; color: var(--text-main); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.modern-file-btn:hover { border-color: var(--primary-color); background-color: #eef2ff; color: var(--primary-color); transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.modern-file-btn:active { transform: translateY(0); }
.modern-file-btn svg { color: var(--text-sub); transition: color 0.2s; }
.modern-file-btn:hover svg { color: var(--primary-color); }

/* Tweet Card Inner Styles */
.tweet-card { background: white; padding: 25px; border-radius: 16px; width: 100%; max-width: 100%; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.tweet-card.dark { background: #15202b; color: white; }
.tweet-card.dim { background: #192734; color: white; }
.tweet-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.tweet-header img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.tweet-user-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tw-name-row { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 1.1rem; }
.tw-verified { color: #1da1f2; flex-shrink: 0; }
.tw-handle { color: #6b7280; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tweet-card.dark .tw-handle, .tweet-card.dim .tw-handle { color: #8899a6; }
.tw-icon { color: #1da1f2; flex-shrink: 0; }
.tweet-body { font-size: 1.5rem; line-height: 1.3; margin-bottom: 15px; white-space: pre-wrap; font-weight: 400; word-wrap: break-word; }
.tweet-meta { color: #6b7280; font-size: 0.95rem; margin-bottom: 15px; }
.tweet-card.dark .tweet-meta, .tweet-card.dim .tweet-meta { color: #8899a6; }
.tweet-divider { height: 1px; background: #e5e7eb; margin-bottom: 15px; }
.tweet-card.dark .tweet-divider, .tweet-card.dim .tweet-divider { background: #38444d; }
.tweet-footer { display: flex; gap: 20px; font-size: 0.95rem; flex-wrap: wrap; }
.tw-label { color: #6b7280; }
.tweet-card.dark .tw-label, .tweet-card.dim .tw-label { color: #8899a6; }

/* --- QR Code Generator CSS --- */
.qr-container { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; padding: 0; background: transparent; }
.tool-header { font-size: 1.75rem; margin-bottom: 1.5rem; font-weight: 800; color: var(--text-main); }
.qr-tabs-wrapper { margin-bottom: 25px; overflow-x: auto; padding-bottom: 5px; }
.qr-tabs { display: flex; gap: 10px; border-bottom: none; min-width: min-content; }
.qr-tab { padding: 10px 20px; border-radius: 50px; background: #f3f4f6; color: var(--text-sub); font-weight: 600; font-size: 0.9rem; white-space: nowrap; transition: all 0.2s ease; border: 1px solid transparent; cursor: pointer; }
.qr-tab:hover { background: #e5e7eb; color: var(--text-main); }
.qr-tab.active { background: var(--primary-color); color: white; box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3); border-bottom: 1px solid transparent; }
.input-wrapper { display: none; flex-direction: column; gap: 15px; }
.input-wrapper.active { display: flex; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.qr-row { display: flex; gap: 20px; margin-bottom: 15px; }
.qr-col { flex: 1; }
.qr-details { margin-top: 30px; background: white; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; }
.qr-details summary { list-style: none; padding: 20px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #f9fafb; transition: background 0.2s; }
.qr-details summary:hover { background: #f3f4f6; }
.qr-details[open] summary { border-bottom: 1px solid #e5e7eb; }
.qr-customization-content { padding: 25px; background: white; }

/* Stylish Color Pickers */
.color-picker-wrapper { position: relative; height: 50px; border-radius: 12px; overflow: hidden; border: 2px solid #e5e7eb; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.color-picker-wrapper:hover { border-color: var(--primary-color); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.color-picker-wrapper input[type="color"] { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; cursor: pointer; border: none; padding: 0; margin: 0; opacity: 0; }
.color-picker-wrapper::after { content: ''; display: block; }
.color-label { pointer-events: none; font-size: 0.8rem; font-weight: 600; background: rgba(255,255,255,0.8); padding: 2px 8px; border-radius: 4px; z-index: 1; }

.file-upload-modern { width: 100%; }
.file-upload-modern input[type="file"] { display: none; }
.upload-trigger { border: 2px dashed #d1d5db; border-radius: 12px; padding: 20px; text-align: center; color: var(--text-sub); cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #f9fafb; }
.upload-trigger:hover { border-color: var(--primary-color); color: var(--primary-color); background: #eff6ff; }
.qr-preview-section { position: sticky; top: 100px; background: transparent; padding: 0; border: none; display: flex; flex-direction: column; align-items: center; }
.preview-card { background: white; padding: 25px; border-radius: 20px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; border: 1px solid #f3f4f6; }
/* Fix QR Code Overflow */
#qrcode img, #qrcode canvas { max-width: 100% !important; height: auto !important; display: block; }

.qr-placeholder { color: var(--text-sub); display: flex; flex-direction: column; align-items: center; gap: 15px; }
.qr-button-group { display: none; flex-direction: column; gap: 12px; width: 100%; margin-top: 25px; }
.btn-dl-qr { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 12px; font-weight: 600; font-size: 1rem; transition: transform 0.1s; text-decoration: none; }
.btn-dl-qr:active { transform: scale(0.98); }
.btn-jpg { background: var(--primary-color); color: white; box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4); }
.btn-png { background: white; color: var(--text-main); border: 2px solid #e5e7eb; }
.modern-range { -webkit-appearance: none; width: 100%; height: 6px; background: #e5e7eb; border-radius: 5px; outline: none; margin-top: 10px; }
.modern-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-color); cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.1s; }
.ec-levels { display: flex; gap: 5px; background: #f3f4f6; padding: 5px; border-radius: 8px; border: 1px solid var(--border-color); }
.ec-btn { flex: 1; padding: 8px 10px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--text-sub); transition: all 0.2s ease; font-size: 0.9rem; }
.ec-btn.active { background: white; color: var(--primary-color); box-shadow: 0 1px 2px rgba(0,0,0,0.1); font-weight: 600; }
.btn-remove-logo { display: none; margin-top: 10px; padding: 8px 16px; background-color: var(--error-bg); color: var(--error); border: 1px solid var(--error-border); border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; width: 100%; }

/* --- Footer --- */
.footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 2rem; margin-top: auto; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: var(--text-sub); font-size: 0.9rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-link { color: var(--text-sub); text-decoration: none; }
.footer-link:hover { color: var(--primary-color); }

@media (max-width: 600px) {
    .tools-grid { grid-template-columns: 1fr; }
    .tool-container { padding: 1.5rem; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
    .tweet-tool-wrapper, .qr-container { grid-template-columns: 1fr; padding: 20px; }
    .tweet-row, .qr-row { flex-direction: column; gap: 15px; }
}

/* --- Password Generator Specifics --- */
.password-container { max-width: 700px; margin: 0 auto; background: var(--card-bg); padding: 2.5rem; border-radius: var(--border-radius); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); width: 100%; }
@media (max-width: 900px) { .password-container { padding: 1.5rem; } }

.password-display-wrapper { position: relative; margin-bottom: 0.5rem; }
.password-display { width: 100%; padding: 20px 50px 20px 20px; font-size: 1.25rem; font-family: monospace; text-align: center; border: 2px solid var(--border-color); border-radius: 12px; background: #f9fafb; color: var(--text-main); word-break: break-all; min-height: 80px; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
@media (max-width: 900px) { .password-display { font-size: 1rem; padding: 15px 40px 15px 15px; } }

/* --- ProCode Playground Specifics --- */
.playground-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.playground-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #1e1e1e;
}

.playground-header {
    background: #252526;
    padding: 10px 20px;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #d4d4d4;
}

.playground-header .tool-title { color: #ffffff; }

.editor-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s;
    background: #444;
    color: white;
}
.editor-btn:hover { opacity: 0.9; }
.editor-btn.primary { background: var(--primary-color); }
.editor-btn.secondary { background: #d13438; }

.editor-container {
    display: flex;
    height: 85vh; 
    min-height: 600px;
    border-bottom: 1px solid #3c3c3c;
}

.editors-pane {
    width: 40%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #3c3c3c;
}

.editor-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #3c3c3c;
    min-height: 0;
}
.editor-box:last-child { border-bottom: none; }

.editor-label {
    padding: 4px 12px;
    font-size: 11px;
    background: #2d2d2d;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #3c3c3c;
}

.editors-pane textarea {
    flex: 1;
    background: #1e1e1e;
    color: #9cdcfe;
    border: none;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
    line-height: 1.5;
}

.preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

#output-frame {
    flex: 1;
    border: none;
    background: white;
}

.preview-pane.dark-preview #output-frame {
    filter: invert(90%) hue-rotate(180deg);
}

.safety-bar {
    background: #fff4ce;
    color: #555;
    padding: 4px 10px;
    font-size: 11px;
    border-top: 1px solid #e0d0a0;
}

.playground-seo {
    display: block;
    padding: 3rem 2rem;
    background: var(--bg-color);
    border-top: 1px solid #3c3c3c;
    color: var(--text-main);
}

.playground-seo .seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.playground-seo h2, .playground-seo h3, .playground-seo h4 {
    color: var(--text-main);
}

.playground-seo p, .playground-seo li {
    color: var(--text-sub);
}

@media (max-width: 900px) {
    .editor-container { flex-direction: column; height: auto; }
    .editors-pane { width: 100%; height: 600px; }
    .preview-pane { height: 500px; border-top: 5px solid #3c3c3c; }
}

/* --- Shared Modern Components --- */

/* Modern Generate Button */
.btn-generate {
    width: 100%;
    margin-top: 2rem;
    padding: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3), 0 2px 4px -1px rgba(79, 70, 229, 0.15);
    letter-spacing: 0.01em;
}
.btn-generate:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4), 0 4px 6px -2px rgba(79, 70, 229, 0.2);
}
.btn-generate:active { transform: translateY(0); box-shadow: 0 2px 4px -1px rgba(79, 70, 229, 0.3); }
.btn-generate svg { transition: transform 0.5s ease; }
.btn-generate:hover svg { transform: rotate(180deg); }

/* Modern Password Length Slider */
.modern-slider-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.range-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.range-label { font-weight: 600; color: var(--text-main); font-size: 1rem; }
.range-value-bubble {
    background: var(--primary-color);
    color: white;
    font-family: monospace;
    font-weight: 700;
    font-size: 1rem;
    padding: 4px 12px;
    border-radius: 20px;
    min-width: 44px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

/* Custom Slider Track */
.modern-range {
    -webkit-appearance: none; width: 100%; height: 8px; background: #e5e7eb; border-radius: 10px; outline: none; transition: opacity .2s; cursor: pointer;
}
.modern-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-color); cursor: pointer; border: 4px solid #fff; box-shadow: 0 0 0 1px #d1d5db, 0 4px 6px rgba(0,0,0,0.1); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.modern-range::-webkit-slider-thumb:hover { transform: scale(1.1); box-shadow: 0 0 0 1px var(--primary-color), 0 6px 8px rgba(79, 70, 229, 0.2); }
.modern-range::-moz-range-thumb {
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary-color); cursor: pointer; border: 4px solid #fff; box-shadow: 0 0 0 1px #d1d5db, 0 4px 6px rgba(0,0,0,0.1); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.modern-range::-moz-range-thumb:hover { transform: scale(1.1); box-shadow: 0 0 0 1px var(--primary-color), 0 6px 8px rgba(79, 70, 229, 0.2); }

/* Educational Content & Tables */
.info-table { 
    width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; background: #fff; border: 1px solid #e5e7eb; 
}
.info-table th, .info-table td { border: 1px solid #e5e7eb; padding: 12px; text-align: left; }
.info-table th { background-color: #f9fafb; font-weight: 600; color: var(--text-main); }
.info-table tr:nth-child(even) { background-color: #f9fafb; }

/* Resource Links */
.resource-list { list-style: none; padding: 0; display: grid; gap: 15px; margin-top: 1rem; }
.resource-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; transition: transform 0.2s, box-shadow 0.2s; background: #fff; }
.resource-item:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.resource-item h4 { margin-bottom: 5px; color: var(--primary-color); }
.resource-item h4 a { text-decoration: none; color: inherit; }
.resource-item p { margin: 0; font-size: 0.9rem; color: var(--text-sub); line-height: 1.5; }

/* Email Extractor Specifics */
.email-container {
    max-width: 800px; margin: 0 auto; background: var(--card-bg); padding: 2.5rem; border-radius: var(--border-radius); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); width: 100%;
}
.email-input-area {
    width: 100%; height: 200px; padding: 15px; border: 2px solid var(--border-color); border-radius: 12px; font-size: 1rem; resize: vertical; margin-bottom: 1.5rem; background: #f9fafb; font-family: monospace;
}
.email-input-area:focus { outline: none; border-color: var(--primary-color); background: white; }
.email-controls { display: flex; gap: 15px; margin-bottom: 2rem; }
.email-btn { flex: 1; padding: 12px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 1rem; transition: opacity 0.2s; }
.btn-extract { background: var(--primary-color); color: white; }
.btn-clear { background: #fee2e2; color: #ef4444; }
.email-btn:hover { opacity: 0.9; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; color: var(--text-main); }
.count-badge { background: #e0e7ff; color: var(--primary-color); padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; }
.results-area {
    width: 100%; min-height: 150px; max-height: 400px; overflow-y: auto; padding: 15px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; font-family: monospace; margin-bottom: 1.5rem; white-space: pre-wrap; color: var(--text-main);
}
.action-bar { display: flex; gap: 15px; }
.btn-action {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: white; border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-main); cursor: pointer; font-weight: 500; transition: all 0.2s;
}
.btn-action:hover { border-color: var(--primary-color); color: var(--primary-color); background: #f0fdf4; }
.btn-action svg { width: 18px; height: 18px; }
@media (max-width: 600px) { .email-container { padding: 1.5rem; } .email-controls, .action-bar { flex-direction: column; } }

/* --- PDF Tools (Split & Merge) --- */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 2rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    animation: fadeIn 0.2s ease;
}

.file-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 0 5px;
}

.btn-remove-file:hover {
    color: #b91c1c;
}
