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

:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e1e8ed;
    --text-color: #333333;
    --text-secondary: #666666;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Main Content */
main {
    margin-bottom: 30px;
}

.hero-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-items: start;
}

.advanced-section {
    margin-top: 70px;
}

.advanced-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.advanced-header h3 {
    margin-top: 4px;
    font-size: 1.4rem;
}

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

.eyebrow {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

/* Sections */
section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

section:hover {
    box-shadow: var(--shadow-hover);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.primary-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.primary-actions .btn-primary {
    width: auto;
    min-width: 170px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Textarea */
textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea::placeholder {
    color: #aaa;
}

textarea[readonly] {
    background-color: #f9f9f9;
    cursor: default;
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stats strong {
    color: var(--primary-color);
    font-weight: 600;
}

.text-secondary {
    color: var(--text-secondary);
}

.warning {
    color: var(--warning-color);
    font-weight: 500;
}

.success {
    color: var(--success-color);
    font-weight: 500;
}

.hidden {
    display: none;
}

/* Options Section */
.options-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.option-group {
    margin-bottom: 20px;
}

.radio-title {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover,
.radio-label:hover {
    background-color: #f8f9fa;
}

.checkbox-label input,
.radio-label input {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label span,
.radio-label span {
    flex: 1;
}

.small-note {
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Buttons */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

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

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

button:disabled:hover {
    transform: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

.subtitle {
    font-size: 1rem;
}

section {
    padding: 20px;
}

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    textarea {
        min-height: 150px;
        font-size: 13px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.5s ease;
}

/* Samples */
.sample-section {
    margin-bottom: 40px;
}

.sample-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.sample-item {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px;
    border: 1px solid var(--border-color);
}

.sample-item header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sample-item h3 {
    margin: 0;
}

.sample-item .desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.sample-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.sample-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.sample-card h4 {
    margin-bottom: 6px;
}

.sample-card textarea {
    min-height: 140px;
}

.badge {
    background: #eef2ff;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}
