/* WatermarkRemoverAI - Clean Grayscale Design */

:root {
    /* Grayscale palette */
    --black: #000000;
    --gray-900: #111111;
    --gray-800: #1a1a1a;
    --gray-700: #2a2a2a;
    --gray-600: #3a3a3a;
    --gray-500: #555555;
    --gray-400: #777777;
    --gray-300: #999999;
    --gray-200: #bbbbbb;
    --gray-100: #dddddd;
    --white: #ffffff;

    /* Semantic colors */
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --bg-tertiary: var(--gray-700);
    --text-primary: var(--white);
    --text-secondary: var(--gray-300);
    --text-muted: var(--gray-400);
    --border-color: var(--gray-700);
    --border-light: var(--gray-600);

    /* Accent for interactive elements */
    --accent: var(--white);
    --accent-hover: var(--gray-200);

    /* Status colors (minimal) */
    --success: #4ade80;
    --error: #f87171;

    /* Spacing & sizing */
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.125rem, 3vw, 1.5rem); }

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 700px;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.navbar-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.navbar-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-brand-icon svg {
    stroke: var(--black);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.navbar-nav a:hover {
    color: var(--text-primary);
    opacity: 1;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--gray-200);
    opacity: 1;
}

.btn-secondary {
    background: var(--gray-700);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-600);
    opacity: 1;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--gray-500);
}

.btn-outline:hover {
    background: var(--gray-800);
    border-color: var(--gray-400);
    opacity: 1;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: var(--bg-primary);
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border-color);
}

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

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Upload Area */
.upload-section {
    padding: 80px 0;
}

.upload-area {
    background: var(--bg-secondary);
    border: 2px dashed var(--gray-600);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--gray-400);
    background: var(--bg-tertiary);
}

.upload-area.has-file {
    border-style: solid;
    border-color: var(--success);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--gray-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--white);
}

.upload-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.upload-subtitle {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.upload-formats {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.upload-format {
    padding: 4px 10px;
    background: var(--gray-700);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

/* Canvas Drawing */
.canvas-section {
    margin-top: 24px;
    display: none;
}

.canvas-section.active {
    display: block;
}

.canvas-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.canvas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.brush-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brush-control label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.brush-control input[type="range"] {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--gray-600);
    border-radius: 2px;
}

.brush-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
}

.canvas-container {
    background: var(--black);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    justify-content: center;
    max-height: 500px;
}

#maskCanvas {
    max-width: 100%;
    cursor: crosshair;
}

/* Preview */
.preview-image {
    max-width: 100%;
    max-height: 250px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.preview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--gray-700);
    border-radius: var(--radius);
}

.preview-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Before/After Examples */
.examples-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.example-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.example-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.example-images::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bg-primary);
}

.example-before,
.example-after {
    position: relative;
}

.example-before img,
.example-after img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.example-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 3px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.example-caption {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* How It Works */
.steps-section {
    padding: 80px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

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

.step-number {
    width: 56px;
    height: 56px;
    background: var(--white);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

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

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

.feature-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--gray-500);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-700);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--white);
}

.feature-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 16px;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 14px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 56px;
}

.footer-column h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: var(--white);
    opacity: 1;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Result Page */
.result-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.result-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 550px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.result-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.result-image {
    position: relative;
}

.result-image img {
    width: 100%;
    border-radius: var(--radius);
}

.result-image-label {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 3px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading */
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-700);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress */
.progress-bar {
    height: 6px;
    background: var(--gray-700);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--white);
    transition: width 0.3s;
}

/* Backdrop / Overlay */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-size: 1.25rem;
    font-weight: 500;
}

.backdrop.active {
    display: flex;
}

.uploading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 17, 17, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.uploading-progress {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.uploading-text {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 28px;
    }

    .result-images {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-4 { margin-top: 32px; }
.mt-8 { margin-top: 64px; }
