/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Body Styling */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    padding: 2rem;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Menu Bar */
.menu-bar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #333;
    color: white;
    padding: 1rem;
    z-index: 1000;
}

.menu-bar ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}

.menu-bar ul li {
    margin: 0 15px;
    position: relative;
}

.menu-bar ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
}

.menu-bar ul li a:hover {
    background-color: #444;
    border-radius: 5px;
}

.menu-bar .dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    padding: 10px 0;
    list-style-type: none;
    border-radius: 5px;
}

.menu-bar .dropdown:hover .dropdown-menu {
    display: block;
}

.menu-bar .dropdown-menu li a {
    padding: 8px 15px;
    color: white;
    text-decoration: none;
    display: block;
}

.menu-bar .dropdown-menu li a:hover {
    background-color: #444;
}

/* Calculator Styles */
.calculator {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin-top: 70px; /* Avoid overlap with menu */
    transition: background 0.3s ease, color 0.3s ease;
}

/* Calculator Header */
h1 {
    color: #2d2d2d;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.8rem;
}

/* Input Group */
.input-group {
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
    text-align: center;
    background: white;
    color: #333;
}

input:focus {
    outline: none;
    border-color: #7c3aed;
}

/* Results Section */
.result {
    margin-top: 2rem;
    background: #f8f5ff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.result h2 {
    color: #7c3aed;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Dark Mode Styles */
.dark-mode {
    background: #121212;
    color: #ffffff;
}

.dark-mode .calculator {
    background: #1e1e1e;
    box-shadow: 0 4px 20px rgba(255,255,255,0.1);
}

.dark-mode h1, 
.dark-mode h2 {
    color: #ffffff;
}

.dark-mode input {
    background: #333;
    color: white;
    border-color: #555;
}

.dark-mode input:focus {
    border-color: #bb86fc;
}

.dark-mode .result {
    background: #222;
}

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

.dark-mode td {
    color: #ddd;
}

/* Sticky Dark Mode Toggle Button */
#dark-mode-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #7c3aed;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s;
}

#dark-mode-toggle:hover {
    background: #6d28d9;
    transform: scale(1.1);
}

/* Ensuring proper spacing for the tables */
table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

th, td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
}

/* Styling the dark mode toggle button */
.dark-mode-button {
    position: absolute; /* Ensure it's placed at the top */
    top: 200px; /* Adjust to place it above the menu bar */
    right: 20px; /* Adjust position as needed */
    z-index: 9999; /* Ensure it's on top of other elements */
    background-color: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: white;
}

body.dark-mode table {
    border-color: #444;
}

body.dark-mode th, body.dark-mode td {
    background-color: #333;
    color: white;
}

/* Optional: Dark mode toggle icon color */
body.dark-mode .dark-mode-button i {
    color: white;
}

body .dark-mode-button i {
    color: #333;
}
/* Add to your existing CSS */
.bpm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    margin-top: 10px;
}

.bpm-display {
    text-align: center;
    margin-bottom: 2rem;
    min-height: 120px;
}

#bpm {
    font-size: 48px;
    font-weight: 600;
    color: #7c3aed;
    transition: color 0.3s ease;
    margin-bottom: 0.5rem;
}
#bpm-count {
    font-size: 128px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
    margin-bottom: 0.5rem;
}

.help-text {
    color: #d4cccc;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.bpm-button {
    padding: 20px 40px;
    font-size: 24px;
    cursor: pointer;
    background-color: #7c3aed;
    color: white;
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 600px;
    height: 200px;
}

.bpm-button:active {
    transform: scale(0.95);
}

/* Dark Mode Adjustments */
.dark-mode #bpm{
    color: #fff;
}

.dark-mode #bpm-count{
    color: #0ed81b;
}

.dark-mode .help-text {
    color: #ccc;
}

.dark-mode .bpm-button {
    background-color: #2e7d32;
}

.dark-mode .bpm-button:hover {
    background-color: #1b5e20;
}