/* =================== Base Styles =================== */
body {
    font-family: "Arial", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* =================== Header & Navigation =================== */
header {
    width: 100%;
    background-color: #333;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0 10px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #444;
}

nav .active {
    background-color: #555;
}

/* =================== Typography =================== */
h1 {
    text-align: center;
    margin: 0;
    padding: 20px;
    width: 100%;
    color: #e0e0e0;
}

/* =================== Buttons =================== */
button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin: 10px 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

button:hover {
    background-color: #555;
}

button:disabled {
    background-color: #333;
    color: #777;
    cursor: not-allowed;
    border: 1px solid #555;
}

/* =================== Main Layout =================== */
.main-layout {
    display: flex;
    width: 90%;
    max-width: 1200px;
    margin-top: 20px;
    gap: 20px;
}

/* Top Control Buttons */
.top-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Left: Capture Section */
.capture-container {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    width: 90%;
    user-select: none;
}

.screenshot {
    max-width: 100%;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    user-select: none;
}

/* Right: Control Panel */
.controls-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

/* Button Container */
.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* =================== Slider =================== */
.slider-container {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.slider-wrapper {
    border: 2px solid #444;
    padding: 5px;
    border-radius: 20px;
}

.slider {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 40px;
    border-radius: 20px;
    background-color: #555;
}

.slider-button {
    flex: 1;
    height: 100%;
    border: none;
    border-radius: 20px;
    background-color: transparent;
    color: #ccc;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.slider-highlight {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    border-radius: 20px;
    background-color: rgba(70, 70, 70, 0.8);
}

#screenButton,
#cameraButton {
    color: #ccc;
}

#screenButton:hover,
#cameraButton:hover {
    color: #fff;
}

/* =================== Dropdown =================== */
#screenDropdown {
    padding: 10px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s, border-color 0.3s;
}

#screenDropdown:focus {
    outline: none;
    border-color: #666;
    background-color: #333;
}

/* =================== Popup Alert =================== */
#popup-alert {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    width: 300px;
    text-align: center;
    display: none;
    z-index: 1000;
}

#popup-alert.success {
    background-color: #28a745;
}

#popup-alert.error {
    background-color: #dc3545;
}

#popup-alert button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#popup-alert button:hover {
    background-color: #555;
}

button.toggle-enabled {
  background-color: #28a745 !important;
  color: #fff;
}

button.toggle-disabled {
  background-color: #6c757d !important;
  color: #ccc;
}
