/* === Default Dark Theme Variables === */
:root {
    --bg-color: #2B2B2B;         /* Charcoal Gray */
    --secondary-bg: #3A3A3A;     /* Graphite Gray */
    --text-color: #F5F5F5;       /* Soft White */
    --secondary-text: #EAEAEA;   /* Cool Light Gray */
    --accent-color: #008080;     /* Teal */
    --highlight-color: #FF6F00;  /* Vibrant Orange */
    --error-color: #FF4D4D;      /* Soft Red */
    --button-bg: #FFFFFF;        /* White */
    --button-text: #2B2B2B;      /* Dark Gray */
}

/* === Light Mode Variables === */
.light-mode {
    --bg-color: #F5F5F5;         /* Light Gray */
    --secondary-bg: #FFFFFF;     /* Pure White */
    --text-color: #2B2B2B;       /* Dark Gray */
    --secondary-text: #3A3A3A;   /* Graphite Gray */
    --accent-color: #007B7B;     /* Slightly Darker Teal */
    --highlight-color: #E55D00;  /* Muted Orange */
    --error-color: #D32F2F;      /* Slightly Muted Red */
    --button-bg: #2B2B2B;        /* Dark Gray */
    --button-text: #FFFFFF;      /* White */
}

/* === General Styles === */
html, body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Header === */
header {
    background: var(--secondary-bg);
    color: var(--text-color);
    padding: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

header h1 {
    font-size: 24px;
    margin: 0;
    text-align: center;
}

/* === Menu Button (Hamburger Icon) === */
.menu-toggle-btn {
    display: none; /* Hide on large screens */
    font-size: 30px;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-top: 10px;
}
code {
  background: #999999d1;
  color: #000;
  padding: 5px 10px;
  border-radius: 4px;
}

/* === Menu Styles === */
.menu-container {
    width: 100%;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    background: var(--secondary-bg);
}

.menu-list li {
    text-align: center;
}

.menu-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    padding: 10px 15px;
    display: inline-block;
}

.menu-list li a:hover {
    color: var(--secondary-text);
}

/* === Main Content Container === */
.container {
    text-align: center;
    background: var(--secondary-bg);
    color: var(--text-color);
    padding: 30px;
    margin: 30px auto;
    width: 95%;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0px 4px 15px rgba(0, 128, 128, 0.3);
    transition: all 0.3s ease;
}

label {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 8px;
    display: inline-block;
    text-align: left;
    transition: color 0.3s ease, transform 0.3s ease;
    padding-left: 5px;
}

/* === Floating Label Effect on Focus === */
.input-group input[type="number"]:focus + label,
.input-group input[type="range"]:focus + label {
    color: var(--highlight-color);
    transform: translateY(-10px); /* Moves label up on focus */
    font-size: 16px;
}

.input-group {
    display: flex;
    flex-direction: row; /* Stack label and input vertically */
    align-items: center;
    margin-bottom: 20px;
    background: var(--secondary-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 128, 128, 0.3);
}

.input-group input[type="range"] {
    width: 75%;
    margin-right: 10px;
    -webkit-appearance: none;
    height: 6px;
    background: var(--accent-color);
    border-radius: 5px;
    outline: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: var(--highlight-color);
    border-radius: 50%;
    cursor: pointer;
}

.input-group input[type="number"] {
    width: 25%;
    text-align: center;
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--secondary-text);
    padding: 8px;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.input-group input[type="number"]:focus {
    border-color: var(--highlight-color);
}

/* === Error Messages === */
.error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
    width: 100%;
}

/* === Buttons === */
button {
    background: var(--button-bg);
    color: var(--button-text);
    padding: 15px;
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-size: 16px;
}

button:hover {
    background: var(--highlight-color);
}

/* === Info Section === */
.info {
    text-align: justify;
    padding: 20px;
    margin: 0 auto;
    width: 80%;
    max-width: 600px;
}

.headerImgContainer {
    display: flex;
    justify-content: center;
}

.hdImage {
    height: 25%;
    width: 25%;
    object-fit: cover;
}

.info h3 {
    color: #ff6f00;
    margin-bottom: 10px;
}

.info p {
    color: var(--secondary-text);
}

/* === Footer === */
footer {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 10px 0;
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.contactUsContainer
{
    display: flex;
    padding: 0.25rem 4rem;
    flex-direction: column;
    align-items: stretch;
}
#chartContainer {
    display: flex;
    flex-direction: column; /* Stack chart and legend vertically */
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    height: auto;
    /* margin: 40px auto;
    padding: 25px; */
    background: var(--secondary-bg);
    border-radius: 12px;
}

/* === Chart Styling (Ensures Proper Size) === */
#sipChart {
    width: 100%;
    max-width: 700px;
    height: 500px;
    min-height: 400px;
}

/* === Custom Vertical Legend Below Chart === */
#chartLegend {
    display: flex;
    flex-direction: column; /* Ensure items are stacked vertically */
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

/* === Legend Item Styling (Each Entry) === */
.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

/* === Legend Color Box === */
.legend-color {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 10px;
    border-radius: 5px;
}

/* === Legend Text === */
.legend-text {
    font-size: 16px;
    color: var(--text-color);
}


/* === Dark Mode Chart === */
body.dark-mode #chartContainer {
    background: var(--bg-color);
    color: var(--text-color);
}

/* === Light Mode Chart === */
body.light-mode #chartContainer {
    background: var(--secondary-bg);
    color: var(--text-color);
}

/* === Toggle Theme Button === */
/* === Toggle Theme Button (Smaller & Positioned to Right) === */
.toggle-theme-btn {
    position: absolute;
    top: 15px;
    right: 45px;
    padding: 8px 12px; /* Smaller button */
    background: var(--accent-color);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    width: auto; /* Prevent full width */
}

.toggle-theme-btn:hover {
    background: var(--highlight-color);
}

.containerGridView{
    display: grid;
    gap: 8px;
    grid-template-columns: 60% 40%;
    justify-items: stretch;
    align-items: end;
}

/* === Mobile & Tablet Styles === */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    header h1 {
        margin-bottom: 5px;
    }

    .menu-toggle-btn {
        display: block;
        position: relative;
        margin-bottom: 10px;
    }

    .menu-list {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100vw;
        background: var(--secondary-bg);
    }

    .menu-list.open {
        display: flex;
    }

    .menu-list li {
        width: 100%;
        padding: 10px;
        text-align: center;
    }

    .container {
        width: 90%;
        max-width: 100%;
        padding: 20px;
    }

    .toggle-theme-btn {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 10px;
    }
    .containerGridView{
        display: block;
    }

    #chartContainer {
        max-width: 100%;
        height: auto;
    }

    #sipChart {
        max-width: 100%;
        height: 400px;
    }

    .legend-text {
        font-size: 14px; /* Smaller font on mobile */
    }
    
    .input-group {
        flex-direction: column;
        align-items: end;
        gap: 1rem;
    }

    label {
        font-size: 16px;
    }

    .input-group input[type="number"],
    .input-group input[type="range"] {
        width: 100%;
    }
    .contactUsContainer{
        padding: 0px;
    }
}


