/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

div {
    max-width: 100%;
}

img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

:root {
    --primary-color: #6B46C1;
    --primary-dark: #553C9A;
    --primary-light: #8B5CF6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --error-color: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Header */
header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

header nav {
    overflow: visible;
}

header nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* Menu Icon and Dropdown */
.menu-container {
    position: relative;
    z-index: 9999;
}

.menu-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border-radius: var(--radius);
    transition: background-color 0.2s, color 0.2s;
}

.menu-icon:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.menu-icon:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.menu-icon svg {
    width: 24px;
    height: 24px;
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 9999;
    display: block;
}

.menu-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    display: block !important;
}

.menu-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.9375rem;
}

.menu-item:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.menu-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.privacy-badge {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: default;
    white-space: normal;
    text-align: center;
    flex-shrink: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.privacy-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.badge:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Tools Section */
.tools-section {
    padding: 3rem 0;
}

.tools-section > .container > h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Tool Tabs Navigation */
.tool-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tool-tabs::-webkit-scrollbar {
    display: none;
}

.tool-tab {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    border: none;
    border-bottom: 3px solid transparent;
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 1;
}

.tool-tab:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.tool-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

.tool-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.tab-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tab-text {
    font-size: 0.9375rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Tool Panels Wrapper with AMP Ads */
.tool-panels-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    align-items: center;
}

.tool-panel-ad {
    display: none;
    width: 300px;
    flex-shrink: 0;
    padding: 1rem;
}

.tool-panel-ad-left {
    order: 0;
}

.tool-panel-ad-right {
    order: 2;
}

/* Tool Panels */
.tool-panels {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    order: 1;
    flex: 1;
    min-width: 0;
}

.tool-card {
    display: block;
}

.tool-card[hidden] {
    display: none !important;
}

/* Tool Card */
.tool-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: opacity 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.tool-card.active {
    display: block;
    opacity: 1;
}

.tool-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* Forms */
.tool-form {
    margin-top: 1.5rem;
}

.tool-form fieldset {
    border: none;
    padding: 0;
}

.tool-form legend {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.form-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* File Input */
.file-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-label {
    display: block;
    padding: 1.5rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.file-label:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.file-label:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.file-label-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.file-input-wrapper input[type="file"]:focus + .file-label {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

/* File Info Display */
.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

.file-info[hidden] {
    display: none !important;
}

.file-info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.file-info-name {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info-size {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-info-remove {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    padding: 0;
}

.file-info-remove:hover {
    background-color: var(--bg-tertiary);
    color: var(--error-color);
}

.file-info-remove:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: inherit;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.3);
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    box-sizing: border-box;
}

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

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.preset-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-btn {
    flex: 1;
    min-width: 0;
}

/* Progress */
.progress-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    box-sizing: border-box;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Results */
.results-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.results-container h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-item img {
    max-width: 100px;
    max-height: 100px;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
    box-sizing: border-box;
}

.result-item-info {
    flex: 1;
    min-width: 0;
}

.result-item-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.result-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-item-actions .btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Preview */
.preview-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.preview-container p {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.preview-container img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

/* Stats */
.stats-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-around;
    box-sizing: border-box;
    width: 100%;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Content Sections */
.content-section {
    padding: 3rem 0;
    background-color: var(--bg-primary);
}

.content-section article {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.content-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background-color: var(--bg-secondary);
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '+';
    display: inline-block;
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.25rem;
}

.faq-item[open] summary::before {
    content: '−';
}

.faq-item summary:hover {
    background-color: var(--bg-secondary);
}

.faq-item p {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Developed By Section */
.developed-by {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.developed-by p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

.crafzio-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

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

.crafzio-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0;
    margin-top: 0;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-main p:first-child {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
}

.footer-main p:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    color: #ffffff;
    border-color: var(--primary-light);
    background-color: rgba(107, 70, 193, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.social-link:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    background-color: rgba(107, 70, 193, 0.15);
}

.social-link svg {
    flex-shrink: 0;
}

.social-link span {
    white-space: nowrap;
}

/* Error Messages */
.error-message {
    background-color: #FEE2E2;
    color: var(--error-color);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    border: 1px solid #FECACA;
}

/* Success Messages */
.success-message {
    background-color: #D1FAE5;
    color: var(--success-color);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    border: 1px solid #A7F3D0;
}

/* Mobile First - Base styles are mobile */
/* Mobile-specific fixes */
@media (max-width: 639px) {
    * {
        max-width: 100%;
    }

    .container {
        padding: 0 0.75rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .hero {
        padding: 2rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .hero h1 {
        font-size: 1.5rem;
        padding: 0 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .hero-description {
        font-size: 1rem;
        padding: 0 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .tool-card {
        padding: 1.25rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .tool-card h3 {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .tools-section {
        padding: 2rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .tools-section > .container > h2 {
        font-size: 1.5rem;
        padding: 0 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .tool-tabs {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        gap: 0.25rem;
    }

    .tool-tab {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.75rem 0.25rem;
        font-size: 0.75rem;
    }

    .tab-text {
        font-size: 0.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .tab-icon {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .logo {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    header nav .container {
        padding: 0 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .menu-dropdown {
        min-width: 160px;
        right: 0;
    }

    .menu-item {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .privacy-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        flex: 1 1 100%;
        order: 2;
    }

    .content-section {
        padding: 2rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .content-section h2 {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .content-section p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .faq-section {
        padding: 2rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .faq-section h2 {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .faq-item summary {
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 1rem;
    }

    .faq-item p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 0 1rem 1rem 1rem;
    }

    .result-item {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        box-sizing: border-box;
    }

    .result-item img {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .result-item-actions {
        width: 100%;
        box-sizing: border-box;
    }

    .result-item-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }

    .tool-form {
        width: 100%;
        box-sizing: border-box;
    }

    .form-group {
        width: 100%;
        box-sizing: border-box;
    }

    .file-input-wrapper {
        width: 100%;
        box-sizing: border-box;
    }

    .file-label {
        width: 100%;
        box-sizing: border-box;
    }

    .preset-buttons {
        width: 100%;
        box-sizing: border-box;
    }

    .preset-btn {
        flex: 1 1 auto;
        min-width: 0;
        box-sizing: border-box;
    }

    .developed-by {
        padding: 1rem 0.75rem;
    }

    .developed-by p {
        font-size: 0.875rem;
        padding: 0 0.5rem;
    }

    footer {
        width: 100%;
        box-sizing: border-box;
        padding: 2rem 0.75rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-social {
        gap: 0.75rem;
        width: 100%;
    }

    .social-link {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        justify-content: center;
    }

    .social-link span {
        display: none;
    }

    .social-link.main-website span {
        display: inline;
    }

    footer p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 0 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Responsive Design */
@media (min-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .tool-tabs {
        justify-content: center;
    }

    .tool-tab {
        min-width: 150px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        gap: 0.5rem;
    }

    .preset-buttons {
        flex-wrap: nowrap;
    }

    .preset-btn {
        min-width: 80px;
    }

    .privacy-badge {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

    .result-item-info {
        min-width: 200px;
    }
}

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

    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .tool-tab {
        min-width: 200px;
        padding: 1.25rem 2rem;
    }

    .tab-text {
        font-size: 1rem;
    }

    .tool-card {
        padding: 2.5rem;
        max-width: 700px;
    }

    .file-label {
        padding: 2rem;
    }

    /* Show tool panel AMP ads on larger screens */
    .tool-panels-wrapper {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 2rem;
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .tool-panel-ad {
        display: flex;
        position: sticky;
        top: 100px;
        align-items: flex-start;
        justify-content: center;
        height: fit-content;
    }
    
    .tool-panels {
        flex: 0 1 700px;
        max-width: 700px;
        min-width: 0;
    }

    .content-section article {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-social {
        justify-content: flex-end;
    }

    .social-link span {
        display: inline;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Drag and Drop States */
.file-input-wrapper.drag-over .file-label {
    border-color: var(--primary-color);
    background-color: rgba(107, 70, 193, 0.05);
}

