/* In 2025, I changed the style of the website to be more elegant but lightweight for any device */
/* Author: rezky_nightly 2025 */

:root {
  /* Font Settings */
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1; /* Fix Chrome */

  /* Background Colors */
  --main-bg-color: #070a1c; /* Deep Space Blue */
  --secondary-bg-color: #040717; /* Dark Galactic Black */
  --accent-bg-color: #1b1f3a; /* Distant Nebula Blue */

  /* Plasma & Glow Colors */
  --plasma-blue: #4285f4; /* Electric Plasma Blue */
  --plasma-purple: #9b59b6; /* Cosmic Purple */
  --star-glow: #f4e542; /* Soft Yellow Star Glow */
  --nebula-glow: #7f7fd5; /* Ethereal Nebula Glow */

  /* Text Colors */
  --text-color: #e0e0e0; /* Soft White */
  --subtext-color: #c5c8e6; /* Light Bluish White */

  /* Borders & Shadows */
  --border-color: rgba(66, 133, 244, 0.5); /* Subtle Plasma Blue */
  --shadow-color: rgba(7, 10, 28, 0.7); /* Deep Space Shadow */

  /* Button Gradient */
  --button-gradient: linear-gradient(135deg, var(--plasma-blue), var(--plasma-purple));

  /* Container */
  --container-bg: rgba(15, 20, 40, 0.85);
  --container-border: rgba(255, 255, 255, 0.15);
    --icon-1: rgba(128, 128, 128); /* Neutral icon color */
}

/* Variable Font Support */
@supports (font-variation-settings: normal) {
    :root {
        font-family: InterVariable, sans-serif;
    }
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit; /* Warisi dari :root */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    scroll-behavior: smooth;
    height: auto;
    overflow: auto;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 2vw, 18px); /* Min 14px, max 18px, skala responsif */
    padding: min(5vw, 20px); /* Gunakan nilai terkecil antara 5% viewport atau 20px */

    /* ✨ Gradient Background */
    background: radial-gradient(circle at 40% 80%, var(--main-bg-color) 10%, var(--accent-bg-color) 40%, var(--secondary-bg-color) 100%);
    position: relative;
}

/* Initial State for Chart and Info Section */
.chart-container, .info-section {
    width: 80%;
    max-width: 800px;
    background: var(--container-bg);
    padding: 20px 30px;
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    margin-top: 8%;
    margin-bottom: 20%;
    overflow: auto;
    text-align: center;
}

.container {
    height: 950px;
    max-height: 1000px;
    width: 55%;
    max-width: 540px;
    background: var(--container-bg);
    padding: 20px 30px; /* Increase top padding to push content down */
    border-radius: 1rem;
    backdrop-filter: blur(8.2px);
    -webkit-backdrop-filter: blur(8.2px);
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    margin-top: 10%;
    margin-bottom: 30%;
    text-align: center;
    position: relative;
}

.chart-container h2, .info-section h3, .container h2{
    font-size: 1.6rem;
    font-weight: 500;
    margin-top: 10%;
    margin-bottom: 10%;
    color: white;
}

.icon-wrapper {
    font-size: 3.5rem;
    margin: 20px 0 10px 0;
}

.form-group p {
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    margin: 20px 0 20px 0;
    color: grey;
    text-decoration: none;
}

.form-group input {
    width: 50%;
    height: 40px;
    border-radius: 1rem;
    padding: 0 15px;
    font-size: 1rem;
    background: transparent;
    color: grey;
    border: 1px solid var(--container-border);
    text-align: center;
    font-weight: 400;
}

button {
    width: 50%;
    height: 42px;
    font-size: 1rem;
    color: white;
    background: rgba(0, 128, 0, 0.4);
    cursor: pointer;
    margin: 60px 0 30px 0;
    border-radius: 1rem;
    border-top-right-radius: 2px;
    border-bottom-left-radius: 2px;

    box-shadow: 0 4px 10px rgba(0, 255, 0, 0.2), 
                0 8px 20px rgba(0, 255, 0, 0.1);
}

button:hover {
    background: green;
    color: white;
    border-radius: 1rem;
    border-top-right-radius: 2px;
    border-bottom-left-radius: 2px;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3), 
                0 8px 30px rgba(0, 255, 0, 0.2);
}

/* Reset Button */
#reset-button {
    width: 50%;
    height: 42px;
    border-radius: 1rem;
    border-top-right-radius: 2px;
    border-bottom-left-radius: 2px;
    font-size: 1rem;
    color: white;
    background: rgba(255, 255, 0, 0.4);
    cursor: pointer;
    margin: 10px 0 40px 0;

    box-shadow: 0 4px 10px rgba(255, 255, 0, 0.2), 
                0 8px 20px rgba(255, 255, 0, 0.1);
}

#reset-button:hover {
    background-color: rgba(255, 255, 0, 0.633);
    color: white;
    border-radius: 1rem;
    border-top-right-radius: 2px;
    border-bottom-left-radius: 2px;
    box-shadow: 0 4px 15px rgba(255, 255, 0, 0.3), 
                0 8px 30px rgba(255, 255, 0, 0.2);
}

.result {
    font-weight: 500;
    font-size: 1.2rem;
    padding-top: 10px;
    padding-bottom: 40px;
    color: white;
}

.result span {
    font-weight: bold;
}

.result .underweight { color: yellow; }
.result .healthy { color: green; }
.result .overweight { color: orange; }
.result .obesity { color: red; }

.chart-container img {
    width: 100%;
    max-width: 600px;
    border-radius: 1rem;
    margin: 20px 0;
    filter: brightness(80%);
}


.chart-description, .info-section p {
    font-size: 1rem;
    color: grey;
    margin: 10% 0;
}

.info-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.info-section th,
.info-section td {
    padding: 10px;
    border: 1px solid var(--container-border);
}

.info-section td, .info-section th {
    background: var(--container-bg);
}

footer {
    background: var(--container-bg);
    padding: 20px 0;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    text-align: center;
    position: relative;
    border-radius: 1rem;
    margin-top: 10%;
    margin-bottom: 6%;
}

.footer-container {
    width: 100%; /* Adjust to full width of the footer */
    max-width: 600px; /* Set max-width for better responsiveness */
    margin: 0 auto; /* Center the container horizontally */
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-container p {
    font-size: 0.9rem;
    margin: 5px;
    color: grey;
}


/* Scroll Up Icon Styling */
.scroll-up {
    position: relative; 
    background: var(--container-bg);
    border-radius: 30%;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    padding: 10px;
    cursor: pointer;
    z-index: 100;
    color: none;
    text-decoration: none;
    font-size: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
}

/* Scroll Icon Styling */
.scroll-down, .scroll-prof, .scroll-art, .scroll-left{
    position: fixed;
    /*Fixedpositioningtostayinview*/
    background: var(--container-bg);
    border-radius: 30%;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    padding: 10px;
    cursor: pointer;
    z-index: 100;
}

/* Common styling for the buttons */
.scroll-down, .scroll-prof, .scroll-art, .scroll-left {
    color: none;
    text-decoration: none;
    font-size: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
}

.scroll-down:hover, .scroll-prof:hover, .scroll-art:hover, .scroll-left:hover, .scroll-up:hover{
    background: none;
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Specific button positions */

.scroll-left {
    left: calc(45% - 27%); /* Adjust position from the left */
    bottom: -18%;
}

.scroll-down {
    left: calc(45% + 7%); /* Adjust position from the left */
    bottom: -18%; /* Adjust based on footer height and spacing */
}

.scroll-prof {
    left: calc(45% - 10%); /* Adjust position from the left */
    bottom: -18%;
}

.scroll-art {
    left: calc(45% + 24%); /* Adjust position from the left */
    bottom: -18%;
}


/* Custom Styling */

.fa-solid, .fa-regular {
    color: var(--icon-1);
}

.fa-champagne-glasses {
    color: purple;
    font-size: 1.2rem;
}

.fa-copyright{
    color: rgba(0, 128, 0, 0.8);
    font-size: 1.2rem;
}

.fa-heart-circle-check {
    color: rgba(255, 0, 0, 0.8);
    font-size: 1.2rem;
}

.fa-envelope {
    color: rgba(255, 255, 0, 0.8);
    font-size: 1.2rem;
}

.fa-github {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.fa-people-group {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.fa-box-open {
    color: rgba(210, 105, 30, 0.8);
    font-size: 1.2rem;
}

/* gender style options */

.gender-options {
    display: flex;
    gap: 30px; /* Increased space for better clarity */
    justify-content: center; /* Centers the options horizontally */
    align-items: center;
    margin: 0 auto; /* Centers the whole group within its parent container */
    padding: 20px 0; /* Adds vertical padding for better spacing */
    flex-wrap: wrap;
    width: fit-content; /* Adjust width to fit the content */
}

.gender-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    color: grey; /* Darker text for better contrast */
}

.gender-options input[type="radio"] {
    display: none; /* Hide the default radio button */
}

.gender-options i {
    font-size: 30px; /* Larger icon for better visibility */
    color: grey;
    margin-right: 10px;
}

/* When the radio button is checked, change the icon color */
.gender-options input[type="radio"]:checked + i {
    color: green;
}

/* Custom hover effect */
.gender-options label:hover i {
    color: white;
}

.gender-options label:hover {
    color: white; /* Darker text on hover for better interaction */
}

/* Custom table styling */
.cinfoT {
    width: 100%;
    border-collapse: separate; /* Use 'separate' to allow border-radius */
    border-spacing: 0; /* Remove space between borders */
    background: var(--container-border); /* Light background for the table */
    border: 1px solid var(--container-border); /* Border for the table */
    border-radius: 10px; /* Rounded corners */
    overflow: hidden; /* Ensure rounded corners apply */
    color: grey;
    
}

.cinfoT th, .cinfoT td {
    padding: 12px 15px; /* Add padding for spacing */
    text-align: left;
    border-bottom: 1px solid var(--container-border); /* Adds border between rows */
    font-size: 16px; /* Font size for readability */
}

.cinfoT th {
    background-color: none; /* Table header background color */
    color: grey; /* White text for contrast */
    font-weight: bold;
    border-top-left-radius: 10px; /* Rounded top-left corner */
    border-top-right-radius: 10px; /* Rounded top-right corner */
    text-align: center;
}

.cinfoT tbody tr:last-child td {
    border-bottom: none; /* Remove bottom border from the last row */
}

.cinfoT tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px; /* Rounded bottom-left corner */
}

.cinfoT tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px; /* Rounded bottom-right corner */
}

@media screen and (max-width: 768px) {
    .cinfoT th, .cinfoT td {
        font-size: 14px; /* Smaller font size for mobile */
    }

    .cinfoT th {
        padding: 8px 10px; /* Smaller padding for mobile */
    }

    .cinfoT td {
        padding: 8px 10px; /* Smaller padding for mobile */
    }

    .cinfoT {
        font-size: 14px; /* Smaller font size for mobile */
    }

    
}