/* Add font family at the top */
body {
    font-family: 'Arial', sans-serif;
}

/* Top line spanning the width of the page */
:root {
  --primary-color: #002B5B;
  --secondary-color: #FFA500;
  --hover-color: #0056b3;
  --text-light: #ffffff;
  --text-dark: #333;
  --z-index-top: 1000;
  --z-index-dropdown: 1001;
}

.top-line {
    background-color: var(--primary-color); /* Dark blue */
    height: 50px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000; /* To make sure it's always on top */
}

.menu-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Menu button in top line */
.menu {
    cursor: pointer;
    color: white;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

/* Name styling */
.name {
    color: #FFA500; /* Orange color */
    font-weight: bold;
    font-size: 16px;
    margin-left: 10px;
}

.quick-links {
    display: flex;
    gap: 14px;
    margin-left: 20px;
}

.quick-links a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.quick-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hover effect for Menu */
.menu:hover {
    background-color: #0056b3; /* Lighter or contrasting blue */
}

/* Custom Settings button with '︙' symbol */
.settings-btn {
    cursor: pointer;
    background-color: transparent;
    color: white;
    padding: 10px;
    border-radius: 80%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s; /* Smooth transition */
}

/* Add this rule for hover effect */
.settings-btn:hover {
    background-color: #0056b3; /* Change to a lighter or contrasting blue */
}

/* Dropdown Menu */
.dropdown {
    display: none;
    background-color: #002B5B; /* Dark blue */
    padding: 10px;
    border: 1px solid #001f40;
    width: 250px;
    margin-top: 10px;
    border-radius: 5px;
    color: white;
    position: absolute;
    top: 50px; /* Position below the menu button */
    left: 20px; /* Align with the menu button */
    z-index: 1001;
}

.dropdown h4 {
    margin: 10px 0 5px;
    font-size: 17px;
    color: #ffffff;
}

.dropdown ul {
    list-style: none;
    padding-left: 20px;
    margin: 0 0 10px 0;
}

.dropdown ul li {
    margin: 4px 0;
    font-size: 16px;
    cursor: pointer;
    color: #d6e4ff;
}

.dropdown ul li:hover {
    text-decoration: underline;
}

/* Settings Menu */
.settings-menu {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: #ffffff;
    color: #333;
    padding: 15px;
    width: 200px;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1002;
}

.settings-menu label {
    display: flex;
    flex-direction: center;
    margin-bottom: 10px;
    gap: 8px;
}

/* Specific style for Dark Mode label to keep checkbox and text inline */
.settings-menu label[for="darkModeToggle"] {
    flex-direction: row;
    align-items: center;
}

/* Style for Font Size label to keep it stacked */
.settings-menu label[for="fontSizeRange"] {
    flex-direction: column;
    align-items: flex-start;
}

.settings-menu input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.settings-menu input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

.settings-menu input {
    width: 100%;
    margin-top: 5px;
}

.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .menu {
    background-color: #333;
}

.dark-mode .settings-menu {
    background-color: #333;
    color: white;
}

.dark-mode .settings-menu label {
    color: white;
}

.dark-mode .dropdown {
    background-color: #333;
    border: 1px solid #444;
}

.dark-mode .settings-btn {
    background-color: #444;
}

.dark-mode .calculator,
.dark-mode .results {
    background-color: #333;
    color: #fff;
}

.dark-mode input,
.dark-mode select {
    background-color: #444;
    color: #fff;
    border-color: #555;
}

.about-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    max-width: 100px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.about-btn:hover {
    background-color: #45a049;
}

/* Overlay styling */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.about-content {
    background-color: white;
    padding: 15px 20px; /* Reduced from 20px */
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.about-content h2 {
    margin: 5px 0; /* Reduced from default */
    line-height: 1.2;
}

.update-date {
    margin: 3px 0 10px; /* Reduced from 5px 0 15px */
    font-size: 14px;
    color: #555;
}

.divider {
    margin: 10px 0; /* Reduced from 15px */
    color: #777;
    font-size: 0.9em;
}

.about-content h4 {
    margin: 10px 0 5px; /* Reduced spacing */
}

.about-content p {
    margin: 5px 0; /* Reduced from default */
    line-height: 1.0;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

.close-btn:hover {
    color: #000;
}

.update-date {
    margin: 5px 0 15px;
    font-size: 14px;
    color: #555;
}

.divider {
    margin: 15px 0;
    color: #777;
}

/* Temporary debug style */
.top-line-container {
    border: 2px solid red !important;
}
.top-line {
    background-color: #002B5B !important;
    color: white !important;
}