/*
 * Hand-maintained frame CSS — ported once from the ~440-line inline <style>
 * block in truyenfull/resources/views/app.blade.php (Task 3.1, step 3).
 * NOT generated by bin/port-assets.sh; edit this file directly from here on.
 *
 * The only change from the Blade source is rewriting its `/img/...`
 * references to `../img/...`, since this file lives in assets/css/ and the
 * ported images live in assets/img/ (a sibling of assets/css/).
 */

body {
    background: url(../img/bg.jpg) top center repeat-x #f4f4f4;
    font-family: 'Roboto Condensed', sans-serif;
    color: #4e4e4e;
}

/* Wrap container for layout */
#wrap {
    min-height: 100%;
    min-height: calc(100% - 117px);
    height: auto !important;
    height: 100%;
}

/* Navigation Bar */
.navbar-custom {
    background-color: #14425d;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    padding: 0;
}

.navbar-custom .navbar-brand {
    color: #f2f2f2;
    font-weight: bold;
    font-size: 24px;
}

.navbar-custom .nav-link {
    color: #f2f2f2 !important;
    transition: background-color 0.3s;
}

.navbar-custom .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Navbar Toggler Icon - Make it visible on dark background */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* Dropdown Toggle Caret */
.nav-link.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: middle;
    border-top: 0.4em solid;
    border-right: 0.4em solid transparent;
    border-bottom: 0;
    border-left: 0.4em solid transparent;
}

/* Custom Dropdown Menu */
.dropdown-menu {
    background-color: #14425d;
    border: none;
}

.dropdown-menu .dropdown-item {
    color: #f2f2f2;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.2);
}

.genres-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}

.genres-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.genres-grid ul li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 100%;
        max-width: 100%;
    }

    .genres-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.search-form {
    max-width: 300px;
}

.search-form .form-control {
    border-radius: 0;
    border-right: 0;
}

.search-form .btn {
    border-radius: 0;
    background-color: transparent;
    border-color: #ced4da;
    color: #f2f2f2;
}

.search-form .btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Breadcrumb */
.navbar-breadcrumb {
    background: #ececec;
    border-top: 1px solid #476171;
}

.breadcrumb-container {
    height: 30px;
    line-height: 30px;
    color: #4e4e4e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Roboto Condensed', Tahoma, sans-serif;
}

.breadcrumb {
    padding: 0;
    margin: 0;
    background-color: inherit;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb>li {
    display: inline-block;
}

.breadcrumb>li+li:before {
    content: "/\00a0";
    padding: 0 5px;
    color: #ccc;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #333;
}

.breadcrumb li:last-child {
    color: #8D8D8D
}

/* Title Section */
.title-section {
    padding-bottom: 10px;
    border-bottom: 2px solid #4e4e4e;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title-section h2 {
    font-size: 1rem;
    font-weight: bold;
    color: #4e4e4e;
    margin: 0;
}

.title-section a {
    text-decoration: none;
    color: inherit;
}

.title-section .form-select {
    border: 1px solid #4e4e4e;
    border-radius: 0;
    padding: 5px 10px;
    background-color: #f4f4f4;
    width: auto;
    max-width: 150px;
}

/* Labels */
.label-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 5px;
    font-size: 12px;
    border: 1px solid;
    border-radius: 3px;
}

.label-full {
    color: #86ad86;
    border-color: #86ad86;
}

/* Footer Styles */
.footer {
    background: linear-gradient(180deg, #1b2631 0%, #151d26 100%);
    color: #aebbc7;
    padding: 35px 0 0;
    margin-top: 30px;
    border-top: 3px solid #233140;
    font-size: 13.5px;
    line-height: 1.6;
}

.footer a {
    color: #64b5f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #90caf9;
    text-decoration: none;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff !important;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.footer-logo i {
    color: #428bca;
    font-size: 24px;
}

.footer-desc {
    color: #90a4ae;
    margin: 10px 0 14px;
    font-size: 13px;
    line-height: 1.65;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cfd8dc;
    font-size: 11.5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.footer-col-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: #428bca;
    border-radius: 2px;
}

.footer-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-tag-pill {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #b0bec5 !important;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.footer-tag-pill:hover {
    background: rgba(66, 139, 202, 0.2);
    border-color: #428bca;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-list li {
    margin-bottom: 8px;
}

.footer-nav-list li a {
    display: inline-flex;
    align-items: center;
    color: #b0bec5 !important;
    font-size: 13px;
    transition: color 0.18s ease, transform 0.18s ease;
}

.footer-nav-list li a:hover {
    color: #428bca !important;
    transform: translateX(3px);
}

/* Footer Bottom Bar */
.footer-bottom-bar {
    margin-top: 30px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #78909c;
}

.footer-bottom-bar .license-text {
    font-size: 11.5px;
    color: #607d8b;
}

.footer-bottom-bar .license-text a {
    color: #78909c;
}

.footer-bottom-bar .license-text a:hover {
    color: #428bca;
}

.btn-scroll-top-footer {
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-color: rgba(255, 255, 255, 0.25);
    color: #cfd8dc;
    transition: all 0.2s ease;
}

.btn-scroll-top-footer:hover {
    background: #428bca;
    border-color: #428bca;
    color: #ffffff;
}

/* Dark Theme Footer */
.dark-theme .footer {
    background: #11171d;
    border-top-color: #1b242e;
}

/* Chapter Theme Backgrounds (applied to #chapter-theme-container) */
#chapter-theme-container {
    background-color: #f4f4f4;
    background-image: none;
    min-height: 1px;
    --chapter-font-family: "Palatino Linotype", "Arial", "Times New Roman", sans-serif;
    --chapter-font-size: 20px;
    --chapter-line-height: 180%;
}

#chapter-theme-container.chapter-theme-F4F4F4 {
    background-color: #f4f4f4;
    background-image: none;
}

#chapter-theme-container.chapter-theme-E9EBEE {
    background-color: #e9ebee;
    background-image: none;
}

#chapter-theme-container.chapter-theme-F4F4E4 {
    background-color: #f4f4e4;
    background-image: none;
}

#chapter-theme-container.chapter-theme-EAE4D3 {
    background-color: #eae4d3;
    background-image: none;
}

#chapter-theme-container.chapter-theme-D5D8DC {
    background-color: #d5d8dc;
    background-image: none;
}

#chapter-theme-container.chapter-theme-FAFAC8 {
    background-color: #fafac8;
    background-image: none;
}

#chapter-theme-container.chapter-theme-EFEFAB {
    background-color: #efefab;
    background-image: none;
}

#chapter-theme-container.chapter-theme-FFF {
    background-color: #ffffff;
    background-image: none;
}

#chapter-theme-container.chapter-theme-hatsan {
    background-color: #f2f2f2;
    background-image: url(../img/bg_op.png);
    background-repeat: repeat;
}

#chapter-theme-container.chapter-theme-sachcu {
    background-color: #c2b49b;
    background-image: url(../img/bg_book_op.png);
    background-repeat: repeat;
}

#chapter-theme-container.chapter-theme-232323 {
    background-color: #232323;
    background-image: url(../img/bg_dark.gif);
    background-repeat: repeat;
}

/* Dark Theme Styles */
.dark-theme {
    background-image: url(../img/bg_dark.gif);
    background-color: #232323;
    background-repeat: repeat;
    color: rgba(255, 255, 255, .6)
}

.dark-theme img {
    opacity: .9
}

.dark-theme a {
    color: #b1b1b1
}


.dark-theme .form-select {
    background-color: #2d3741;
    color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.dark-theme .navbar-custom {
    background: #242f39;
    border-bottom-color: #242f39;
    box-shadow: 0 0 1px rgba(10, 10, 10, .4)
}

.dark-theme .navbar-breadcrumb {
    background: #2e3740;
    border-top: 0
}

.dark-theme .breadcrumb-container {
    color: #b1b1b1
}

.dark-theme .title-section {
    border-bottom-color: #fff;
}

.dark-theme .title-section h2 {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.dark-theme .title-section h2 a {
    color: #fff;
}

.dark-theme .title-section .form-select {
    background-color: #2d3741;
    box-shadow: 0 0 3px rgba(10, 10, 10, .4);
    border: 0;
    color: #fff;
}

.dark-theme .footer {
    background-color: #1a1a1a;
    border-top: 1px solid #333;
}

.dark-theme .footer a {
    color: #fff;
}

.dark-theme .search-form .form-control {
    box-shadow: inset 0 0 2px rgba(0, 0, 0, .3);
    background: #1c242d;
    border: 1px solid #192128;
    color: #fff;
}

.dark-theme .search-form .form-control::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

.dark-theme .search-form .btn {
    color: #92bb35;
    border-color: #92bb35;
    text-shadow: 1px 1px 0 rgba(10, 10, 10, .4);
    background: rgba(10, 10, 10, .15);
}

.dark-theme .dropdown-menu {
    background-color: #2f566d;
    border-color: #333;
}

.dark-theme .dropdown-menu .dropdown-item {
    color: #f2f2f2;
}

.dark-theme .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, .15);
}

.dark-theme .card {
    background-color: #1a1a1a;
    border-color: #333;
}

.dark-theme .card-header {
    background-color: #242f39;
    border-bottom-color: #333;
}

@media only screen and (min-width:1025px) {
    .dark-theme .hot-stories .item .item-img {
        box-shadow: 0 1px 2px #000;
    }
}
