/* ========================================
   💻 CODE MINIFIER - BASE CSS
   Matches QuickToolHub Design System
======================================== */

/* ✅ Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Theme */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: hsl(258, 90%, 66%);
    --accent-color: #ec4899;
    --success-color: #10b981;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   ⬅️ BACK BUTTON
======================================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    margin: 2rem 2rem 1rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    width: fit-content;
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* ========================================
   📦 MAIN CONTAINER
======================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    width: 100%;
    flex: 1;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.25rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* ========================================
   🛠️ TOOL WRAPPER
======================================== */
.tool-wrapper {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    animation: fadeInUp 0.6s ease;
}

/* ========================================
   🔄 MODE TABS
======================================== */
.mode-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--bg-color);
    padding: 0.5rem;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.tab-btn:hover:not(.active) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* ========================================
   🎛️ CONTROLS BAR
======================================== */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.language-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-select label {
    font-weight: 600;
    color: var(--text-color);
}

.language-select select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-color);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.language-select select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auto-detect-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auto-detect-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* ========================================
   📥 INPUT & OUTPUT SECTIONS
======================================== */
.input-section, .output-section {
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.paste-btn, .copy-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.paste-btn {
    background: var(--bg-color);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.paste-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.copy-btn {
    background: var(--success-color);
    color: white;
}

.copy-btn:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.copy-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    background: var(--bg-color);
    color: var(--text-color);
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

#error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ========================================
   🚀 ACTION BUTTON
======================================== */
.action-section {
    text-align: center;
    margin: 2rem 0;
}

.process-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.process-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.process-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   🔄 RESET BUTTON
======================================== */
.reset-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--text-light) 0%, #475569 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.reset-btn:active {
    transform: translateY(0);
}

/* ========================================
   📊 STATS BAR
======================================== */
.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   ℹ️ INFO & FEATURES SECTIONS
======================================== */
.info-section, .features-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-lg);
}

.info-section h3, .features-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ========================================
   ❓ FAQ SECTION (NEW)
======================================== */
.faq-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.faq-section > div {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.faq-section > div:hover {
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

.faq-section h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-section p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========================================
   📝 ARTICLE SECTION (NEW)
======================================== */
.seo-article {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.seo-article h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.seo-article p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    color: var(--text-color);
}

.seo-article strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ========================================
   📝 BLOG CTA
======================================== */
.blog-cta {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin-top: 2rem;
}

.blog-cta-content h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-cta-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.blog-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.blog-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   👣 FOOTER
======================================== */
.pro-footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #e2e8f0;
    padding: 3rem 1rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-brand {
    text-align: center;
}

.footer-brand img {
    width: 200px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #475569;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}