:root {
    --primary-color: #000000;
    --primary-hover: #333333;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --accent-color: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

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

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

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

header .subtitle {
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 400;
}

.protocol-tip {
    margin-top: 12px;
    font-size: 14px;
    color: #ef4444;
    background: #fee2e2;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
}

.main-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: start;
}

.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card h2 {
    font-size: 22px;
    margin-bottom: 24px;
    font-weight: 700;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.drop-zone:hover, .drop-zone.active {
    border-color: var(--primary-color);
    background-color: #f0f0f0;
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 16px;
}

.preview-container, .result-container {
    margin-top: 24px;
    text-align: center;
}

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

.file-info {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.control-group {
    margin-bottom: 28px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    appearance: none;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 6px;
}

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    outline: none;
}

input[type="number"]:focus {
    border-color: var(--primary-color);
}

.control-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    display: inline-block;
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    background-color: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

.result-container h3 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
    text-align: left;
}

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 40px;
    }
    
    .container {
        padding: 40px 16px;
    }
}
