body {
    margin: 0;
    overflow: hidden;
    /*background: #f8f5f0;*/
    background: #fdfff5;
    overscroll-behavior: none; /* Prevents pull-to-refresh on mobile */
    font-family: 'Inter', 'Arial', sans-serif; /* Added Inter font */
}
canvas {
    display: block;
    cursor: pointer;
    touch-action: none; /* Important for preventing default touch actions like scrolling */
}

#settingsToggleBtn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
#settingsToggleBtn svg {
    width: 28px;
    height: 28px;
    stroke: #333;
}

/* Styles for the new Top Right Microphone Button */
#topRightMicBtn {
    position: absolute;
    top: 15px;
    right: 15px; /* Positioned to the right */
    z-index: 1001; /* Ensure it's above other elements if needed, same as settingsToggleBtn */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%; /* Make it circular */
    width: 48px;  /* Same size as settingsToggleBtn */
    height: 48px; /* Same size as settingsToggleBtn */
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

#topRightMicBtn svg {
    width: 24px; /* Adjust size of the SVG icon as needed */
    height: 24px;
    fill: #333; /* Color of the SVG icon */
}


#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95); 
    padding-left: 20px; 
    padding-right: 20px;
    padding-top: 75px; /* Increased to ensure gear icon doesn't overlap content if home button is tall */
    padding-bottom: 40px; 
    border-radius: 12px; 
    font-family: 'Inter', 'Arial', sans-serif;
    box-shadow: 0 6px 15px rgba(0,0,0,0.18); 
    width: 320px; 
    max-height: calc(100vh - 20px); 
    overflow-y: auto; 
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); 
    -webkit-overflow-scrolling: touch; 
    box-sizing: border-box; 
}
#controls.open {
    transform: translateX(0);
}

/* --- NEW HOME BUTTON STYLES --- */
#homeBtn {
    position: absolute;
    top: 15px; /* Align with settingsToggleBtn vertically */
    right: 15px;
    background: none; /* Transparent background */
    border: none;
    padding: 8px; /* Padding around the SVG */
    cursor: pointer;
    z-index: 1002; /* Ensure it's clickable on top of panel content */
    width: 44px; /* Match settings toggle size */
    height: 44px; /* Match settings toggle size */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Make it circular */
    transition: background-color 0.2s ease;
}
#homeBtn:hover {
    background-color: rgba(0,0,0,0.05); /* Subtle hover effect */
}
#homeBtn svg {
    width: 24px; /* SVG icon size */
    height: 24px;
    stroke: #333; /* Icon color */
    fill: none; /* No fill for outline icon */
}
/* --- END HOME BUTTON STYLES --- */


button {
    margin: 12px 0; 
    padding: 12px 20px; 
    border: none;
    border-radius: 8px; 
    background-color: #4CAF50; 
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease; 
    display: block;
    width: 100%;
    font-size: 1em;
    font-weight: 500; 
}

#toggleMicBtn { /* This is the button in the settings panel */
    /* Style will be dynamically changed by JS or specific classes below */
}
#toggleMicBtn.mic-enabled-style { /* When mic is ON (so button shows "Disable Mic") */
     background-color: #f44336; /* Red for disable action */
}
#toggleMicBtn.mic-disabled-style { /* When mic is OFF (so button shows "Enable Mic") */
    background-color: #4CAF50; /* Green for enable action */
}


.control-group { margin-bottom: 20px; } 
.control-group label { display: block; margin-bottom: 8px; font-size: 0.95em; color: #333; font-weight: 500; }
.control-group input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 10px;
    vertical-align: middle;
    height: 22px; 
    accent-color: #4CAF50; 
}
.control-group output { font-size: 0.95em; color: #555; vertical-align: middle; display: inline-block; width: 45px; text-align: right; }

.freq-display {
    font-size: 0.8em;
    color: #555;
    margin-left: 8px; 
    font-style: italic;
    display: inline-block; 
    min-width: 50px; 
}
.level-display {
    font-weight: normal; 
    color: #337ab7; 
    display: inline-block;
    min-width: 40px; 
    text-align: right;
    padding-left: 5px;
}


h3 { margin-top: 10px; margin-bottom: 18px; font-size: 1.2em; color: #111; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; font-weight: 600; }
#audioStatus {
    font-size: 0.9em;
    color: #555;
    margin-top: 12px;
    min-height: 1.3em;
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 6px;
}
 hr {
    border: none;
    border-top: 1px solid #e5e5e5; 
    margin: 25px 0; 
}

a.private{
    color:#777;
}
#privacyPolicy{
    margin-bottom:100px;
}
#settingsEndBlock{
    margin-bottom:100px;
}