/* System Font Stack */

/* Shared Color Variables matching ImageResizerAI design language */
:root {
    --bg-color: #f5f8ff; /* Light Background */
    --card-bg: #ffffff;
    --text-primary: #0f2d59;
    --text-secondary: #5f728d;
    --primary-color: #1e5ccb; /* Specified Blue Theme */
    --primary-hover: #164bb0;
    --danger-color: #dc2626; /* Specified Red */
    --danger-hover: #b91c1c;
    --download-color: #16a34a; /* Specified Green */
    --download-hover: #15803d;
    --secondary-color: #64748b; /* Specified secondary gray/blue */
    --secondary-hover: #475569;
    --border-color: #e2eaf4;
    --dropzone-border: #a8c7fa;
    --dropzone-bg: #fafcff;
    --dropzone-hover-bg: #f1f6ff;
    --shadow-soft: 0 10px 30px rgba(15, 45, 89, 0.04);
    --shadow-medium: 0 12px 35px rgba(15, 45, 89, 0.08);
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Navbar */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Container */
.container {
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    flex: 1;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    padding-left: 8px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span.separator {
    color: var(--text-secondary);
    opacity: 0.6;
}

.breadcrumbs span.current {
    color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 32px;
    padding: 10px 0;
}

.hero-section h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-section p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Main Cards */
.tool-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    border: 1px solid rgba(226, 234, 244, 0.6);
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .tool-card {
        padding: 20px;
    }
}

/* Dropzone Upload Section */
.dropzone-container {
    border: 2.5px dashed var(--dropzone-border);
    background-color: var(--dropzone-bg);
    border-radius: var(--border-radius-md);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone-container:hover, .dropzone-container.dragover {
    background-color: var(--dropzone-hover-bg);
    border-color: var(--primary-color);
}

.upload-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #e8f0fe;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.dropzone-container h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dropzone-container p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.supported-formats {
    font-size: 13px;
    color: var(--text-secondary);
}

.supported-formats strong {
    color: var(--text-primary);
}

/* Action Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(30, 92, 203, 0.15);
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15);
}

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

.btn-download {
    background-color: var(--download-color);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
    flex: 1;
}

.btn-download:hover:not(:disabled) {
    background-color: var(--download-hover);
}

.btn-download:disabled {
    background-color: #cbd5e1;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

/* Workspace Layout */
.workspace-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
}

@media (max-width: 900px) {
    .workspace-layout {
        grid-template-columns: 1fr;
    }
}

.workspace-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.workspace-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Interactive Preview Container */
.preview-container {
    background-color: #fafcff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    max-height: 580px;
    position: relative;
    overflow: hidden;
}

#mainPreviewCanvas {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 12px rgba(15, 45, 89, 0.05);
    background-color: #eaecef;
}

/* Side Card Settings */
.settings-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: 0 4px 12px rgba(15, 45, 89, 0.02);
}

.settings-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Mode Switch Tabs */
.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background-color: #f1f3f4;
    padding: 4px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.mode-tab {
    background: none;
    border: none;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.mode-tab.active {
    background-color: var(--card-bg);
    color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Settings Inputs Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    accent-color: var(--primary-color);
}

.slider-val-badge {
    background-color: #e8f0fe;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 13px;
    min-width: 36px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.grid-inputs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.number-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    color: var(--text-primary);
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.number-input:focus {
    border-color: var(--primary-color);
}

/* Color Picker Container */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-container input[type="color"] {
    width: 44px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    background: none;
    outline: none;
}

.hex-text-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    color: var(--text-primary);
}

.hex-text-input:focus {
    border-color: var(--primary-color);
}

/* Checkbox alignment */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0 !important;
    cursor: pointer;
    user-select: none;
}

/* Advanced Settings Panel */
.advanced-settings-container {
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
    padding-top: 16px;
}

.advanced-toggle-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
}

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

.advanced-toggle-btn .arrow-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.advanced-toggle-btn.expanded .arrow-icon {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.advanced-content.expanded {
    max-height: 480px;
    opacity: 1;
    overflow-y: auto;
}

.advanced-inner {
    padding: 12px 4px 4px 4px;
}

/* Download Section */
.download-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: 0 4px 12px rgba(15, 45, 89, 0.02);
    margin-top: 24px;
}

.download-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.download-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 600px) {
    .download-buttons-container {
        flex-direction: column;
        gap: 12px;
    }
}

/* Progress Bar Styles */
.progress-bar-container {
    background-color: #fafcff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-top: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.progress-track {
    background-color: #e2eaf4;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    background-color: var(--download-color);
    height: 100%;
    width: 0%;
    transition: width 0.1s ease;
}

/* Slices Preview Section */
.slices-section {
    margin-top: 28px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.slices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.slice-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.slice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.slice-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2;
}

.slice-thumbnail-container {
    width: 100%;
    aspect-ratio: 1;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.slice-thumbnail-container canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slice-details {
    padding: 12px;
}

.slice-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slice-filename {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slice-size {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Toast Container & Notification Toast Alert system */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    background-color: #0f2d59;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(15, 45, 89, 0.25);
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification.success {
    border-left: 4px solid var(--download-color);
}

.toast-notification.error {
    border-left: 4px solid var(--danger-color);
}

.toast-notification.info {
    border-left: 4px solid var(--primary-color);
}

/* SEO content card blocks */
.seo-article-card {
    background-color: var(--card-bg) !important;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 234, 244, 0.8);
    padding: 40px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.seo-article-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.seo-article-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.seo-article-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Steps Grid */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .how-it-works-grid {
        grid-template-columns: 1fr;
    }
}

.how-step {
    background-color: #fafcff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    text-align: center;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.how-step h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.how-step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

.feature-table {
    width: 100%;
    border-collapse: separate; /* Collapsed से बदलकर Separate किया ताकि बॉर्डर रेडियस काम करे */
    border-spacing: 0;
    margin-top: 24px;
    margin-bottom: 24px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden; /* बॉर्डर रेडियस को कोनों पर स्मूथ रखने के लिए */
}

.feature-table th, .feature-table td {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 18px;
    text-align: left;
}

.feature-table th {
    background-color: #fafcff; /* आपके सर्च बॉक्स के बैकग्राउंड से मैच करता हुआ */
    color: var(--text-primary);
    font-weight: 700;
}

.feature-table tr:nth-child(even) {
    background-color: #f8fafc; /* टेबल रोज़ में लाइट अल्टरनेटिव शेड */
}

/* FAQs */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.faq-item {
    background-color: #fafcff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
}

.faq-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Notice box */
.notice-card {
    background-color: #fffbeb !important; /* हल्का वार्म सैंडबॉक्स येलो */
    border: 1px solid #fef3c7 !important;
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    color: #92400e;
}

.notice-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #78350f;
}

.notice-card p {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 0;
    color: #b45309;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
    margin-top: auto;
}

/* ============================================================
   GLOBAL RESPONSIVE SYSTEM (Mobile & Tablet Overrides)
   ============================================================ */

/* Prevent horizontal page scrolling & ensure responsive image/element defaults */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: keep-all;
}

/* Ensure forms and inputs fit viewport */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
select,
textarea,
input[type="range"] {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Reusable responsive classes */
.table-responsive, .comparison-table-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
}

.table-responsive table, .comparison-table-wrapper table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

/* Enforce readable column widths in responsive scroll container */
.table-responsive table.feature-table, 
.table-responsive table.seo-comparison-table,
.comparison-table-wrapper table.feature-table, 
.comparison-table-wrapper table.seo-comparison-table {
    min-width: 600px !important;
}

/* Media Queries for Viewports <= 900px (Tablets & Landscape Mobile) */
@media (max-width: 900px) {
    .container {
        padding: 20px 16px !important;
    }
    
    .workspace-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Auto typography scaling */
    .hero-section h1 {
        font-size: 32px !important;
    }
    
    h2, .seo-article-card h2 {
        font-size: 22px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    body, p, td, th {
        font-size: 15px !important;
    }
}

/* Media Queries for Viewports <= 768px (Tablets / Portrait Devices) */
@media (max-width: 768px) {
    /* Touch target guidelines: ensure buttons, select boxes, dropdowns, and checkboxes have a min of 44px */
    button, 
    select, 
    input[type="button"], 
    input[type="submit"], 
    .btn-primary, 
    .btn-secondary, 
    .btn-danger, 
    .btn-download {
        min-height: 44px !important;
    }
    
    .advanced-toggle-btn {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Action buttons: perfect alignment, equal height/width, same padding, border radius */
    .actions-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }
    
    .actions-grid button,
    .actions-grid .btn-primary,
    .actions-grid .btn-secondary,
    .actions-grid .btn-danger,
    .actions-grid .btn-link {
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 16px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: var(--border-radius-sm) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        text-align: center !important;
    }

    /* Style the text-only link button to behave like an outline button on mobile */
    .actions-grid .btn-link {
        background-color: #ffffff !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-secondary) !important;
        box-shadow: 0 2px 6px rgba(15, 45, 89, 0.04) !important;
        text-decoration: none !important;
    }
    
    .actions-grid .btn-link:hover {
        color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        text-decoration: none !important;
    }

    /* Vertical centering of icons in buttons */
    .actions-grid svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }
    
    /* Interactive Preview Container height adjustment to fit screens */
    .preview-container {
        padding: 12px !important;
        min-height: 280px !important;
        max-height: 480px !important;
    }
}

/* Media Queries for Viewports <= 600px (Mobile Devices) */
@media (max-width: 600px) {
    .container {
        padding: 16px 12px !important;
    }
    
    /* Reduce page container padding and prevent content touching screen edges (min 16px padding on outer section) */
    body {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    header {
        padding: 12px 16px !important;
    }
    
    /* Ensure content cards maintain consistent padding, equal margins, rounded corners, no content touching edges */
    .tool-card, .seo-article-card {
        padding: 20px 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: var(--border-radius-md) !important;
    }
    
    .dropzone-container {
        padding: 30px 16px !important;
    }
    
    /* Stack elements in grid layouts */
    .grid-inputs-container {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* Breadcrumbs wrap */
    .breadcrumbs {
        flex-wrap: wrap !important;
        padding-left: 4px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }
    
    /* Auto typography scaling */
    .hero-section h1 {
        font-size: 28px !important;
    }
    
    h2, .seo-article-card h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    body, p, td, th {
        font-size: 14px !important;
    }
    
    /* Stats panel wrap for compressor */
    .stats-panel-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Media Queries for Viewports <= 480px (Small Mobile Devices, e.g., 320px, 360px, 375px) */
@media (max-width: 480px) {
    /* Stack action buttons vertically on small screens to prevent text squashing */
    .actions-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .settings-card {
        padding: 16px !important;
    }
    
    /* Auto typography scaling */
    .hero-section h1 {
        font-size: 24px !important;
    }
    
    h2, .seo-article-card h2 {
        font-size: 18px !important;
    }
    
    h3 {
        font-size: 15px !important;
    }
    
    body, p, td, th {
        font-size: 13.5px !important;
    }
    
    .stats-panel-wrapper {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

