:root {
    --primary: #1a1a1a;
    --secondary: #4a4a4a;
    --accent: #0066cc;
    --background: #f9f9f9;
    --surface: #ffffff;
    --error: #cc0000;
    --success: #008800;
    --border: #e0e0e0;
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--primary);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

h1 {
    margin-bottom: 5px;
}

.privacy-notice {
    background-color: #e8f4fd;
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.privacy-notice h2 {
    font-size: 1.1em;
    margin-top: 0;
    color: var(--accent);
}

.field {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

input[type="number"], input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
}

.hint {
    font-size: 0.85em;
    color: var(--secondary);
    margin-top: 4px;
}

button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0055aa;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.secondary-btn {
    background-color: transparent;
    color: var(--secondary);
    border: 1px solid var(--border);
    margin-top: 20px;
}

.secondary-btn:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none !important;
}

.error-box {
    background-color: #fde8e8;
    border-left: 4px solid var(--error);
    padding: 15px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 20px;
}

.error-box h3 {
    color: var(--error);
    margin-top: 0;
}

.spinner {
    border: 4px solid rgba(0,0,0,0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--accent);
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-state, #processing-state {
    text-align: center;
    padding: 30px;
}

.recommendation-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.size-badge {
    margin-bottom: 15px;
}

.size-badge .label {
    display: block;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
}

.size-badge .value {
    display: block;
    font-size: 3em;
    font-weight: 800;
    color: var(--primary);
}

.progress-bar {
    background-color: rgba(255,255,255,0.5);
    height: 8px;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-fill {
    background-color: var(--success);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.warning {
    color: #cc6600;
    font-size: 0.9em;
    margin-top: 8px;
    font-weight: 600;
}

.explainability {
    background: #fff8e1;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid #ffe082;
}

.explainability h3 {
    margin-top: 0;
    font-size: 1.1em;
}

.adjustment-text {
    color: var(--success);
    background: #e8f5e9;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

.measurements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.measurement-item {
    background: var(--background);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
}

.measurement-item h4 {
    margin: 0 0 5px;
    font-size: 0.9em;
    color: var(--secondary);
}

.point-estimate {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0;
}

.range {
    font-size: 0.8em;
    color: var(--secondary);
    margin: 5px 0 0;
}