:root {
    --primary-color: #000000;
    --primary-hover: #333333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e5e7eb;
    --border-radius-lg: 16px;
    --border-radius-md: 8px;
    --border-radius-sm: 4px;
    --transition-speed: 0.2s;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.hidden {
    display: none !important;
}

/* Header */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #000;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #000;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm);
}

.language-switcher select {
    border: 1px solid var(--border-color);
    background: white;
    padding: 6px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--text-color);
}

.header-tagline {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-actions {
        flex-direction: column;
        gap: 12px;
    }
}

/* Hero Section */
.hero,
.hero-section {
    padding: 40px 0 32px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 8px;
}

.hero-note {
    max-width: 700px;
    margin: 16px auto 0;
    color: var(--text-muted);
    font-size: 0.98rem;
}

.hero-section .tool-card {
    margin-top: 18px;
}

/* Tool Section */
.tool-section {
    padding: 0 0 40px;
}

.tool-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin: 0 auto;
    max-width: 1000px;
}

.upload-area {
    border: 2px dashed #000;
    border-radius: var(--border-radius-md);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #f0f0f0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.icon-circle {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    background: white;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #000;
    margin: 6px 0 8px;
}

.mt-4 {
    margin-top: 16px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.upload-area:hover::before, .upload-area.dragover::before {
    opacity: 1;
}

.upload-icon {
    color: #000;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: scale(1.1);
}

.upload-area p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.small-text {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
}

/* Editor Area */
.editor-area {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: stretch;
}

.preview-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f1f5f9;
    border-radius: var(--border-radius-md);
    padding: 20px;
    min-height: 300px;
    max-height: 60vh;
    background-image: 
      linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
      linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
      linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
      linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    /* Shadows are drawn inside the canvas, so no CSS shadow needed here */
}

/* Controls Panel */
.controls-panel {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.controls-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .editor-area {
        flex-direction: column;
    }
    
    .controls-panel {
        flex: auto;
    }
    
    .controls-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
    display: flex;
    justify-content: space-between;
}

/* Range Input */
.range-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type=range] {
    -webkit-appearance: none;
    flex: 1;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e5e7eb;
    border-radius: 2px;
}

.number-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type=number] {
    width: 65px;
    padding: 6px 20px 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    text-align: right;
    outline: none;
}

input[type=number]:focus {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.unit {
    position: absolute;
    right: 8px;
    color: #666;
    font-size: 0.9rem;
    pointer-events: none;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.radio-btn {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-btn input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-btn span {
    display: block;
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    user-select: none;
}

.radio-btn input:checked ~ span {
    background-color: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Select Form */
.form-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: white;
    outline: none;
    cursor: pointer;
}

.form-select:focus {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 10px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-indigo {
    background-color: #000;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-indigo:hover {
    background-color: #333;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: white;
    color: #000;
    border: 1px solid #e5e7eb;
}

.btn-outline:hover {
    background-color: #f8fafc;
    border-color: #000;
}

/* --- Content Sections --- */
.content-section, .comparison-section, .features-section, .steps-section, .faq-section {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.section-lede {
    max-width: 720px;
    margin: -20px auto 32px;
    color: var(--text-muted);
}

/* Comparison Section */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.comparison-item {
    position: relative;
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.img-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #000;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}

.badge-blue {
    background: #000; 
}

.comparison-item img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rounded-demo {
    border-radius: 24px;
}

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

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.f-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.feature-list {
    margin: 28px auto 0;
    max-width: 860px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px 28px;
    list-style: none;
    padding: 0;
}

.feature-list li {
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.feature-list li::before {
    content: "•";
    color: #000;
    font-weight: 700;
    line-height: 1.4;
}

/* Steps Flow */
.steps-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #000;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.step h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.step-arrow {
    font-size: 2rem;
    color: #cbd5e1;
    font-weight: 300;
}

@media (max-width: 600px) {
    .steps-flow {
        flex-direction: column;
        gap: 30px;
    }
    .step-arrow {
        transform: rotate(90deg);
    }
}

.steps-list {
    max-width: 700px;
    margin: 24px auto 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.steps-list li {
    margin-bottom: 10px;
}

/* FAQ Section (Details/Summary) */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

details {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

summary {
    padding: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    list-style: none;
    position: relative;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.2s ease;
}

details[open] summary::after {
    content: '−';
    transform: translateY(-2px);
}

details p {
    padding: 0 20px 20px;
    color: var(--text-muted);
    margin: 0;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.use-case {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
}

.use-case h3 {
    margin-bottom: 10px;
}

.use-case p {
    color: var(--text-muted);
}

.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

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

.tip-item h3 {
    margin-bottom: 8px;
}

.tip-item p {
    color: var(--text-muted);
}

.use-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

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

.use-table thead th {
    background: #f8fafc;
    font-weight: 700;
}

.use-table tbody tr:last-child td {
    border-bottom: none;
}

/* Footer Grid */
.site-footer {
    background-color: white;
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-links-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #000;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Legal Pages */
.legal-page h1 {
    margin-bottom: 18px;
}

.legal-page > p {
    margin-bottom: 40px;
    color: var(--text-muted);
}

.legal-content {
    margin-top: 0;
}

.legal-content h2 {
    margin-top: 48px;
    margin-bottom: 18px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.legal-content ul {
    margin: 0 0 24px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

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