/* =========================================================
   HVL Physics Graph
   File: css/style.css
   Mục đích: Giao diện dùng chung cho toàn bộ hệ thống
   ========================================================= */

/* ---------- Reset cơ bản ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
    line-height: 1.5;
}

/* ---------- Biến giao diện ---------- */
:root {
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --background: #f5f7fb;
    --surface: #ffffff;
    --border: #dbe2ea;
    --text: #1f2937;
    --muted: #64748b;
    --radius: 10px;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* ---------- Khung chung ---------- */
.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.site-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Nội dung ---------- */
main {
    padding: 24px 0;
}

/* ---------- Card ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

/* ---------- Nút ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

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

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

/* ---------- Form ---------- */
.input,
.select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
}

.input:focus,
.select:focus {
    outline: 2px solid rgba(29, 78, 216, 0.15);
    border-color: var(--primary);
}

/* ---------- Khu vực đồ thị ---------- */
.graph-area {
    min-height: 420px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .container {
        width: min(100% - 20px, 1200px);
    }

    .site-header .container {
        min-height: 64px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 10px 0;
    }

    main {
        padding: 16px 0;
    }

    .card {
        padding: 16px;
    }
}
