body {
    background-color: #f8f9fa !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

a {
    color: #777;
    text-decoration: none;
}

a:hover {
    color: #0dcaf0;
}

::selection {
    background: #0dcaf0;
    color: #fff;
}

#txtUrl {
    border: 2px solid #ddd;
    border-radius: 8px 0 0 8px;
    padding: 12px 20px;
    font-size: 16px;
    transition: border-color 0.2s;
}

#txtUrl:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.25);
    outline: none;
}

#btnSubmit {
    border-radius: 0 8px 8px 0;
    transition: background 0.2s;
}

#btnSubmit:hover {
    background: #0aa3c0 !important;
}

/* Video card */
#videoCard .card {
    border-radius: 16px;
    overflow: hidden;
}

#videoCard .card .btn:hover {
    background: #0aa3c0 !important;
}

/* Ad containers — invisible feel */
.ad-subtle {
    max-width: 728px;
    margin: 8px auto;
    opacity: 0.88;
    background: transparent;
    border: none;
    line-height: 0;
}

.ad-subtle > div,
.ad-subtle > iframe {
    display: block;
    margin: 0 auto;
}

.ad-note {
    font-size: 11px;
    color: #bbb;
    margin: 0 0 4px 0;
    letter-spacing: 0.3px;
}

/* Modal */
.modal-content {
    border-radius: 12px !important;
}

.modal .btn {
    transition: background 0.2s;
}

/* Footer */
footer a:hover {
    color: #0dcaf0 !important;
}

/* Responsive */
@media (max-width: 600px) {
    #txtUrl {
        font-size: 14px;
        padding: 10px 14px;
    }
    #btnSubmit {
        font-size: 14px;
        padding: 10px 14px;
    }
    h1, .h3 {
        font-size: 22px !important;
    }
}

/* Navbar */
.navbar-brand:hover {
    color: #0aa3c0 !important;
}

.nav-link:hover {
    color: #0dcaf0 !important;
}

/* Theme toggle button */
#themeToggle {
    border: 1px solid #ddd;
    background: transparent;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

#themeToggle:hover {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

/* ===================== */
/*       DARK MODE        */
/* ===================== */

[data-bs-theme="dark"] body {
    background-color: #1a1a2e !important;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #16213e !important;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1a1a2e !important;
}

[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] .h4 {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}

[data-bs-theme="dark"] a {
    color: #a0a0a0;
}

[data-bs-theme="dark"] a:hover {
    color: #0dcaf0 !important;
}

[data-bs-theme="dark"] #txtUrl {
    background-color: #1a1a2e;
    color: #e0e0e0;
    border-color: #333;
}

[data-bs-theme="dark"] #txtUrl:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.25);
}

[data-bs-theme="dark"] .card {
    background-color: #16213e;
    border-color: #2a2a4a;
}

[data-bs-theme="dark"] footer {
    background-color: #16213e !important;
    border-color: #2a2a4a !important;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #16213e;
    color: #e0e0e0;
}

[data-bs-theme="dark"] hr {
    border-color: #2a2a4a;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] #themeToggle {
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] #themeToggle:hover {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

[data-bs-theme="dark"] .navbar .nav-link {
    color: #a0a0a0 !important;
}

[data-bs-theme="dark"] .navbar .nav-link:hover {
    color: #0dcaf0 !important;
}

[data-bs-theme="dark"] .navbar {
    background-color: #16213e !important;
}
