body {
    text-align: center;
    background: url('../images/background/exhang.webp') no-repeat center center fixed;
    background-size: cover;
    color: white;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    min-height: 100vh;
}

/* Override Bootstrap's default light theme with dark theme */
.bg-dark-transparent {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.card-body {
    color: white;
}

.card .card-header, div.card-header {
    color: white !important;
}

.navbar {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.7rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 15px;
    font-size: 1.2em;
}

#timer-container {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.timer {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: bold;
}

.lights {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.light {
    width: 40px;
    height: 180px;
    border-radius: 0.5rem; /* Rounded corners */
    background-color: #dc3545;
    border: 2px solid #383838;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(270deg);
    transform-origin: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    pointer-events: none;
    font-family: 'Courier New', monospace;
    opacity: 1.0;
    transition: opacity 0.3s ease;
}

.light-countdown.inactive {
    opacity: 0.35;
}

.timer-card {
    background-color: rgba(33, 37, 41, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.timer-box {
    padding: 0.75rem;
}

.timer-section {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    height: 100%;
}

/* Custom button styles that match the theme */
.btn-timer {
    background-color: #343a40;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.btn-timer:hover {
    background-color: #495057;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Form controls with dark theme */
.form-control-dark {
    background-color: #343a40;
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.form-control-dark:focus {
    background-color: #212529;
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Duration input styling */
.duration-input {
    width: 80px;
    flex: none;
}

.timer-section-container,
.hangar-opens-container {
    background-color: rgba(33, 37, 41, 0.7);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 386px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-section-container h3,
.hangar-opens-container h3 {
    margin: 0 0 1.0rem 0;
}

.timer-section-container .timer,
.hangar-opens-container .timer {
    margin: 0;
    line-height: 1.2;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.7);
}

footer p.left-align {
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

footer p.center-align {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Map preview images */
.map-preview {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
}

.map-preview:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Footer padding */
footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.7);
}

footer p.left-align {
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Toggle box styles for data entry list */
.toggle-box {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background-color: #343a40;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toggle-box[data-state="0"] {
    background-color: #343a40; /* Neutral state */
}

.toggle-box[data-state="1"] {
    background-color: #dc3545; /* Red state */
}

.toggle-box[data-state="2"] {
    background-color: #28a745; /* Green state */
}

/* Entry row styling */
.entry-row {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(33, 37, 41, 0.5);
}

/* Entry number styling */
.entry-number {
    font-weight: bold;
    font-size: 1.1em;
    color: #adb5bd;
}

/* Delete button styling */
.delete-entry-btn {
    padding: 0.0rem 0.0rem;
    line-height: 1;
    margin-left: 0.5rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

/* Ensure entry rows don't wrap */
.entry-row .row {
    white-space: nowrap;
    overflow-x: auto;
}

.delete-entry-btn i {
    font-size: 1.1rem;
}

/* Styling for hangar open times list */
#open-times-list ul.list-group {
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
}

#open-times-list ul.list-group li.list-group-item {
    background-color: rgba(33, 37, 41, 0.7);
    border: none;
    padding: 0.5rem 1rem;
    font-family: monospace;
    font-size: 1.1rem;
    color: #f8f9fa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#open-times-list ul.list-group li.list-group-item:last-child {
    border-bottom: none;
}
