/* --- TAM‑CNC BRAND COLOURS --- */
:root {
    --navy: #0A1A2F;
    --steel: #3A6EA5;
    --cyan: #00C8FF;
    --ice: #A8E4FF;
    --white: #FFFFFF;

    /* Font Size Variables - Optimized for Mobile (Slightly Bigger) */
    --font-size-base: 1.35rem;      /* Base font size for body text */
    --font-size-nav-button: 1.2rem; /* Font size for navigation buttons */
    --font-size-label: 1.2rem;      /* Font size for input labels */
    --font-size-h2: 2.2rem;         /* Larger heading size */
    --font-size-h4: 1.4rem;         /* Slightly larger than base */
}

img {
    width: 250px;
    height: 200px;
}

body {
    background: var(--navy);
    color: var(--ice);
    font-family: "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    font-size: var(--font-size-base); /* Apply base font size */
    line-height: 1.3;                /* Improve readability with line height */
}

h2,
h4 {
    color: var(--cyan);
    text-align: center;
    /* You can also set specific font sizes for headings here */
    font-size: var(--font-size-h2);
}

h4 {
    font-size: var(--font-size-h4);
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(58, 110, 165, 0.15);
    border: 1px solid var(--steel);
    border-radius: 12px;
}

nav {
    background: rgba(10, 26, 47, 0.7);
    /* Slightly transparent navy for nav background */
    padding: 15px 0;
    border-bottom: 1px solid var(--steel);
    margin-bottom: 30px;
    /* Space below the nav */
}

nav .container {
    margin: 0 auto;
    padding: 0 20px;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    /* Center items horizontally */
    gap: 15px;
    /* Space between buttons */
}

/* Styling for the links to look like buttons */
.nav-button {
    display: block;
    /* Make buttons take full width */
    width: 80%;
    /* Adjust width as needed */
    max-width: 300px;
    /* Optional: constrain max width */
    padding: 10px 20px;
    background: var(--cyan);
    /* Button background color */
    color: var(--navy);
    /* Button text color */
    text-decoration: none;
    font-weight: bold;
    font-size: var(--font-size-nav-button); /* Use variable */
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    /* Smooth transitions */
    text-align: center;
}

.nav-button:hover {
    background: var(--ice);
    /* Lighter color on hover */
    transform: translateY(-2px);
    /* Slight lift effect */
}

.nav-button:active {
    transform: translateY(0);
    /* Press down effect */
}

.shape-diagram {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 250px;
    border: 2px solid var(--steel);
    border-radius: 8px;
}

.generator-section {
    margin-top: 20px;
    font-size: var(--font-size-label); /* Use variable */
}

.input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-section label {
    font-size: var(--font-size-label); /* Use variable */
    color: var(--ice);
}

.input-section input {
    width: 100%;
    padding: 10px;
    background: #0F243D;
    border: 1px solid var(--steel);
    border-radius: 6px;
    color: var(--white);
}

button {
    width: 100%;
    padding: 16px;
    background: var(--cyan);
    border: none;
    border-radius: 6px;
    color: var(--navy);
    font-weight: bold;
    font-size: var(--font-size-base); /* Use base font size for buttons */
    cursor: pointer;
    margin-bottom: 20px;
}

button:hover {
    background: var(--ice);
}

.gcode-output-area {
    background: #0F243D;
    border: 1px solid var(--steel);
    padding: 15px;
    border-radius: 8px;
}

pre {
    white-space: pre-wrap;
    color: var(--white);
    font-size: 1.1rem; /* Ensure pre text is also readable and slightly larger */
}
