:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header & Breadcrumb */
.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.brand-logo span {
    color: var(--text-color);
}

.breadcrumb-nav {
    padding: 12px 0;
    font-size: 0.875rem;
}

.breadcrumb {
    display: flex;
    list-style: none;
    gap: 8px;
    color: var(--text-muted);
}

.breadcrumb li::after {
    content: "/";
    margin-left: 8px;
}

.breadcrumb li:last-child::after {
    content: "";
}

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

/* Content Layout */
.tool-intro {
    margin: 20px 0;
}

.tool-intro h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.tool-intro p {
    color: var(--text-muted);
}

.calculator-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 32px;
}

/* Upload Area Dropzone */
.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: #f1f5f9;
    transition: background 0.2s, border-color 0.2s;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

/* Editor Panel */
.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

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

.input-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.input-field select,
.input-field input[type="range"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

/* Preview Canvas */
.preview-container {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.canvas-wrapper {
    background: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    display: inline-block;
    max-width: 100%;
}

canvas {
    max-width: 100%;
    height: auto;
    box-shadow: var(--shadow);
    background: #fff;
}

.photo-info-box {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
    font-size: 0.9rem;
}

.info-item .value {
    font-weight: 700;
    margin-left: 6px;
}

.info-item .value.highlight {
    color: var(--primary-color);
}

/* Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

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

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

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* SEO Article & Table */
.seo-article {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.seo-article h2, .seo-article h3 {
    margin: 16px 0 8px 0;
}

.seo-article ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.table-responsive {
    overflow-x: auto;
    margin: 16px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
}

code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}