:root {
    --primary-color: #00b4d8;
    --primary-hover: #0096b1;
    --bg-color: #fbfbff;
    --text-color: #1a1a1a;
    --text-secondary: #555;
    --card-bg: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --accent-blue: #00b4d8;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header styles moved to global styles.css and .page-header */

.breadcrumb {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.breadcrumb:hover {
    opacity: 0.7;
}

.subheading {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #1a1a1a 0%, #434344 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Lab Card Container --- */
.lab-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 4rem;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Top Controls --- */
.top-controls {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-end;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.unit-label {
    text-transform: none;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 4px;
}

/* Input Styling */
input[type="number"] {
    width: 140px;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.15);
}

.input-with-note {
    position: relative;
}

.note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 500;
    position: absolute;
    bottom: -20px;
    left: 0;
    white-space: nowrap;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

button {
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: inherit;
}

.btn-start {
    background: #16A34A;
    color: white;
}

.btn-start:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.btn-reset {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-reset:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--text-secondary);
}

/* --- Simulator Layout --- */
.simulator-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* --- Simulation Main --- */
.simulation-main {
    position: relative;
}

.canvas-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Data Displays --- */
.live-data-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.data-box {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 140px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.data-label {
    font-size: 0.75rem;
    opacity: 0.8;
    color: white;
    margin-right: 10px;
}

.data-acc {
    color: var(--accent-green);
}

.data-vel {
    color: var(--accent-blue);
}

.data-disp {
    color: var(--accent-yellow);
}

/* --- Side Analysis Panel --- */
.analysis-sidebar {
    display: flex;
    flex-direction: column;
}

.analysis-panel {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.force-card {
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.force-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.force-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.force-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.force-net {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1));
    border: 2px solid var(--success-color);
    margin-top: 0.5rem;
}

.force-net .force-value {
    color: #059669;
}

/* --- Graphs Section --- */
.graphs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.graph-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.graph-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.graph-container {
    width: 100%;
    height: 250px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {

    .simulator-layout,
    .graphs-grid {
        grid-template-columns: 1fr;
    }

    .analysis-sidebar,
    .analysis-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .top-controls {
        flex-direction: column;
        align-items: stretch;
    }

    input[type="number"],
    .button-group {
        width: 100%;
    }

    .button-group {
        margin-left: 0;
    }

    .canvas-container {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .lab-card {
        padding: 1rem;
    }

    .force-card {
        padding: 0.75rem;
    }
}