@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Color Palette */
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --secondary: #64748b;

    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

/* Layout */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar / Navigation */
.sidebar {
    background-image: linear-gradient(180deg, var(--text-main) 0%, #1e293b 100%);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Card */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Premium Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background-color: var(--bg-surface);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--secondary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.flex {
    display: flex;
}

.gap-4 {
    gap: 1rem;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Results Section */
.results-panel {
    background-color: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
    color: var(--primary-dark);
}

.results-header {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculation-steps {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    white-space: pre-wrap;
}

/* Validation */
.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 280px;
        height: 100vh;
        position: sticky;
        top: 0;
    }
}