/* Base Styles */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    background: linear-gradient(45deg, #1070b9 1%, #000055 100%);
    background-repeat: no-repeat;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Header & Navigation */
header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
    margin-bottom: 30px;
}

nav#menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 4vw, 2.5rem); /* Responsive, but always proportional */
    padding: 14px clamp(10px, 6vw, 40px);
    margin: 30px auto 0 auto;
    border-radius: 40px;
    background: rgba(10, 20, 40, 0.1); /* More transparent, darker, preserves gradient */
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.45); /* More pronounced shadow */
    max-width: 100vw;
    flex-wrap: nowrap; /* Prevent wrapping to new lines */
    min-width: 0;
    box-sizing: border-box;
}

nav#menu a {
    color: white;
    text-decoration: none;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    padding: 10px clamp(8px, 3vw, 24px);
    border-radius: 30px;
    text-shadow: 0 0 5px #000;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    white-space: nowrap;
    min-width: 0;
    box-sizing: border-box;
}

nav#menu a.thispage {
    background-color: rgba(0, 0, 0, 0.35);
    
}

nav#menu a:hover {
    background-color: rgba(0, 235, 162, 0.15);
    
    /* Removed text-shadow on hover for no glow */
}
.footer {
    background-color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 2em;
    flex-wrap: wrap;
}

.socialIcons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
}

.footerImage {
    height: 2.5em;
    width: auto;
    max-height: 8vw;
    transition: transform 0.3s ease;
}

.footerImage:hover {
    transform: scale(1.1);
}

.copyright {
    color: white;
    opacity: 0.7;
    font-size: 1em;
    text-align: right;
    white-space: nowrap;
    margin-top: 0.5em;
}

@media (max-width: 768px) {
    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .socialIcons {
        justify-content: center;
        gap: 1em;
    }

    .copyright {
        font-size: 0.9em;
        margin-top: 1em;
        text-align: center;
    }

    .footerImage {
        height: 2em;
        max-height: none;
    }
}


/* Typography */
h1, h2, h3 {
    text-align: center;
    margin: 0;
    padding: 18px 0 10px 0;
    color: white;
    text-shadow: 0 2px 8px #000;
    letter-spacing: 1px;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-top: 10px;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    margin-bottom: 10px;
}
h3 {
    font-size: clamp(1.1rem, 2vw, 1.7rem);
    font-weight: 500;
    margin-bottom: 10px;
}

p {
    font-size: clamp(1rem, 1.7vw, 1.7rem);
    color: white;
    text-align: justify;
    text-justify: inter-word;
    /*max-width: 800px;*/
    
    margin: 0 auto 0 auto;
    padding: 0; 
    padding-left: 5%;  
    padding-right: 5%;
    line-height: 1.6;
    letter-spacing: 0.01em;
}
.pCenter{
    font-size: clamp(1rem, 1.7vw, 1.7rem);
    color: white;
    text-align: center;
    text-justify: inter-word;
    max-width: 800px;
    margin: 0 auto 0 auto;
    padding: 0; 
    line-height: 1.6;
    letter-spacing: 0.01em;
}
.niceLink, a {
    color: #b0efff;
    text-decoration: underline;
    font-size: inherit;
    word-break: break-all;
    transition: color 0.2s;
    padding: 0;
    border-radius: 4px;
    margin: 0 2px;
    display: inline;
    background: none;
    line-height: inherit;
    vertical-align: baseline;
    white-space: nowrap;
}

.niceLink:hover, a:hover {
    color: #00eba2;
    background: none;
    text-decoration: underline;
}

ul {
    padding-left: 6%;  /* Reduced from 12% to 6% */
    padding-right: 6%; /* Reduced from 12% to 6% */
    margin-bottom: 18px;
    margin-top: 0;
}

li {
    margin-bottom: 10px;
    line-height: 1.6;
    max-width: 800px;
    color: white;
}

/* Buttons */
button, .collapseButton1 {
    padding: 10px 24px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 10px 0;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

button:hover, .collapseButton1:hover {
    background-color: #45a049;
}

/* Chart Container */
.chart-container {
    height: 400px;
    margin: 30px auto 0 auto;
    width: 90vw;
    max-width: 900px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
    padding: 18px 0;
}

/* Inputs */
input[type="number"] {
    width: 110px;
    padding: 8px 10px;
    margin-right: 12px;
    border-radius: 4px;
    border: 1px solid #b0efff;
    font-size: 1rem;
    background: #f8faff;
    color: #003863;
    outline: none;
    transition: border 0.2s;
}

input[type="number"]:focus {
    border: 1.5px solid #00eba2;
}

/* Disabled Button */
button:disabled, .collapseButton1:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Expression Box */
.expression {
    font-family: monospace;
    background-color: #f0f0f0;
    color: #003863;
    padding: 6px 10px;
    border-radius: 5px;
    margin: 6px 0;
    display: inline-block;
}

/* Image Styles */
.defaultImage {
    display: block;
    margin: 0 auto;
    width: 400px;
    border-radius: 10px;
}

.squareImage {
    display: block;
    margin: 0 auto;
    width: 25vw;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
}

.largePhoto,
.dropdownInside {
    display: block;
    margin: 1.5vw auto;
    border-radius: 3vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
}

.largePhoto {
    width: 90vw;
}

.dropdownInside {
    width: 40vw;
    height: 30vw;
}

.smallPhoto {
    display: flex;
    max-height: 90vh;
    max-width: 80vw;
    margin: 1.5vw auto;
    border-radius: 3vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
}


.oneNav {
    display: inline-block;
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 8px 22px;
    border-radius: 40px;
    background: rgba(10, 20, 40, 0.72);
    color: #b0efff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.45);
    transition: background 0.2s, color 0.2s;
    border: none;
    z-index: 10;
    cursor: pointer;
    outline: none;
    margin-bottom: 32px; /* Add margin below the button */
}

/* Add extra top margin to h1 if preceded by .oval-back/.oneNav in header */
header + h1 {
    margin-top: 64px;
}

/* Layout */
.sideBySide {
    margin: 5vw;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

/* Side-by-side layout utility with margin on left and right */
.sidebyside {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.5vw;
    flex-wrap: wrap;
    margin-left: 10vw;
    margin-right: 10vw;
}

/* Side-by-side layout utility with no extra margin (full width) */
.sidebysidefull {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 700px) {
    .sidebyside,
    .sidebysidefull {
        flex-direction: column;
        gap: 2vw;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    nav#menu {
        gap: clamp(0.3rem, 2vw, 1.2rem);
        padding: 10px clamp(4px, 2vw, 16px);
        flex-direction: row; /* Always horizontal */
        flex-wrap: nowrap;   /* Prevent wrapping */
    }
    .chart-container {
        width: 98vw;
        min-width: 0;
        padding: 8px 0;
    }
    p, .niceLink, li, ul {
        padding-left: 4%;
        padding-right: 4%;
    }
}

@media (max-width: 600px) {
    nav#menu {
        gap: clamp(0.2rem, 1vw, 0.7rem);
        padding: 6px clamp(2px, 1vw, 8px);
        flex-direction: row; /* Always horizontal */
        flex-wrap: nowrap;   /* Prevent wrapping */
    }
    h1 {
        font-size: 2rem;
        padding: 10px 0 6px 0;
    }
    h2 {
        font-size: 1.2rem;
        padding: 8px 0 4px 0;
    }
}

