/* Navbar Styles */
@font-face {
    font-family: 'MagicCards';
    src: url('font/MagicCardsNormal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'MagicCards';
    src: url('font/MagicCardsNormal.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Define the scrolling animation */
@keyframes scrollBackground {
    from {
        background-position-x: 0;
    }
    to {
        background-position-x: -7680px;
    }
}

/* Disable animation when auto-refresh is enabled */
body.auto-refresh .chim-navbar-wrapper,
body.auto-refresh .chim-status-nav {
    animation: none !important;
}

.chim-navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: url('../images/navbarback.png');
    background-repeat: repeat-x;
    background-position: 0 0;
    font-family: 'Futura CondensedLight', Arial, sans-serif;
    animation: scrollBackground 240s linear infinite;
}

.chim-navbar {
    background: transparent !important;
    padding: 10px 0;
}

.chim-status-nav {
    background: url('../images/navbarback.png');
    background-repeat: repeat-x;
    background-position: 0 0;
    width: 100%;
    padding: 10px 0;
    animation: scrollBackground 240s linear infinite;
}

.chim-status-container {
    padding: 0 15px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 30px;
    text-transform: uppercase;
    font-family: 'Futura CondensedLight', Arial, sans-serif;
}

/* Homepage Logo Images Hover Effects */
.navbar-brand img {
    transition: all 0.3s ease-in-out;
    filter: brightness(1) drop-shadow(0 0 0px transparent);
}

.navbar-brand:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) drop-shadow(0 0 8px rgba(242, 124, 17, 0.6));
}

.navbar-brand:active img {
    transform: scale(0.98);
    filter: brightness(1.2) drop-shadow(0 0 12px rgba(242, 124, 17, 0.8));
}

/* Main Navbar Items */
.nav-item.dropdown.mx-2 {
    font-family: 'MagicCards', sans-serif;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: #ffffffda;
    margin: 0 4px;
}

.nav-item.dropdown.mx-2 > .nav-link {
    font-family: 'MagicCards', sans-serif;
    font-size: 22px;
    color: #ffffffda;
    padding: 4px 8px;
    word-spacing: 4px;
}

/* Dropdown Menu Styles */
.nav-item.dropdown.mx-2 .dropdown-menu {
    font-family: 'MagicCards', sans-serif;
    letter-spacing: 0.5px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 8px 0;
    min-width: 220px;
}

.nav-item.dropdown.mx-2 .dropdown-item {
    padding: 8px 16px;
    margin: 2px 0;
    color: #ffffff;
    transition: all 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
}

.dropdown-menu {
    padding: 8px 0;
    margin: 0;
    border-radius: 6px;
}

/* Brand dropdown under logo */
.brand-menu {
    font-family: 'MagicCards', sans-serif;
    letter-spacing: 1.2px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 8px 0;
    min-width: 260px;
}
.brand-menu .dropdown-item {
    font-family: 'MagicCards', sans-serif !important;
    font-weight: 700;
    font-size: 18px;
    padding: 10px 16px;
    color: #ffffff;
    letter-spacing: 1.6px;
    word-spacing: 6px;
    line-height: 1.25;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.brand-menu,
.brand-menu * {
    font-family: 'MagicCards', sans-serif !important;
    font-weight: 700 !important;
}
.chim-navbar-wrapper .brand-menu .dropdown-item,
.dropdown-menu.brand-menu .dropdown-item {
    font-family: 'MagicCards', sans-serif !important;
    font-weight: 700 !important;
}
.brand-menu .dropdown-item:hover {
    background-color: rgba(2, 42, 106, 0.85);
}

/* Center the brand menu under the logo at all widths */
.navbar-center.dropdown {
    position: relative;
}
.navbar-center .brand-menu {
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.dropdown-header {
    font-family: 'Futura CondensedLight', Arial, sans-serif;
    font-size: 16px;
    color: #ffc107;
    text-transform: uppercase;
    padding: 12px 12px 4px;
    margin: 0;
    font-weight: bold;
}

.dropdown-item {
    font-family: 'Futura CondensedLight', Arial, sans-serif;
    font-size: 15px;
    padding: 8px 16px;
    margin: 2px 0;
    color: #ffffff;
}

.dropdown-item:hover {
    background-color: #2c5282;
    color: #ffffff;
}

.dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #333;
    opacity: 0.5;
}

/* Profile Selection Overlay */
.overlay {
    position: fixed;
    display: flex;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 10000;
    cursor: pointer;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: all 0.2s ease-out;
}

.overlay[style*="display: block"] {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.overlay-content {
    background-color: #2c2c2c;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 1200px;
    min-height: 200px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: default;
    transform-origin: center;
    transition: all 0.2s ease-out;
    margin: auto;
    margin-top: 50px;
    opacity: 0;
    transform: scale(0.95);
}

.overlay[style*="display: block"] .overlay-content {
    opacity: 1;
    transform: scale(1);
}

/* Prevent background interaction when overlay is active */
body.overlay-active {
    overflow: hidden;
    pointer-events: none;
}

.overlay-active .overlay,
.overlay-active .overlay-content {
    pointer-events: auto;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.close-btn:hover {
    color: rgb(255, 0, 0);
}

/* Grid Layout for Options */
.options-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

/* Option Buttons */
.dropdown-option {
    position: relative;
    padding: 15px;
    background-color: rgba(3, 22, 51, 0.8);
    border: 1px solid rgba(138, 155, 182, 0.3);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    color: #ffffff;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: block;
    font-weight: 500;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

.dropdown-option:hover {
    background-color: rgba(2, 42, 106, 0.9);
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%) scale(0.8);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: rgba(255, 215, 0, 0.7);
    transition: all 0.2s ease-in-out;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.favorite-btn:hover {
    background: rgba(2, 42, 106, 0.4);
    color: rgba(255, 215, 0, 1);
    transform: translateY(-50%) scale(0.85);
}

.favorite-btn.favorited {
    color: rgba(255, 215, 0, 1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Profile Selection Button */
.profile-select-btn {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    padding: 15px;
    margin: 0;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    color: inherit;
    font-weight: 500;
    font-family: 'Futura CondensedLight', Arial, sans-serif;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.3px;
}

.profile-select-btn:hover {
    background: rgba(2, 42, 106, 0.4);
    backdrop-filter: blur(5px);
}

.profile-select-btn:focus {
    outline: none;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    justify-content: center;
}

.filter-button {
    padding: 8px 12px;
    background-color: rgba(3, 22, 51, 0.8);
    border: 1px solid rgba(138, 155, 182, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    font-family: 'Futura CondensedLight', Arial, sans-serif;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

.filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.filter-button[data-filter="all"] {
    background-color: rgba(32, 122, 74, 0.8);
    border-color: rgba(72, 187, 120, 0.3);
}

.filter-button[data-filter="all"]:hover,
.filter-button[data-filter="all"].active {
    background-color: rgba(42, 142, 94, 0.9);
    border-color: rgba(72, 187, 120, 0.4);
}

.filter-button:not([data-filter="all"]):hover,
.filter-button:not([data-filter="all"]).active {
    background-color: rgba(2, 42, 106, 0.9);
    border-color: rgba(96, 165, 250, 0.4);
}

/* NPC Profile Button */
.btn-npcprofile {
    background-color: #5E0505;
    color: #ffffff;
    padding: 10px 20px;
    border: 1px solid rgba(138, 155, 182, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    margin: 5px;
    font-weight: 500;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(180deg, 
                      rgba(255, 255, 255, 0.08) 0%,
                      rgba(255, 255, 255, 0) 100%);
}

.btn-npcprofile:hover {
    background-color: #4A0404;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.btn-npcprofile:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

/* Configuration Depth Section */
.config-depth-section {
    display: inline-block;
    font-size: 10px;
    height: 40px;
    padding-right: 10px;
    vertical-align: top;
}

/* Status Section */
.status-section {
    display: inline-block;
    max-width: 900px;
    font-size: small;
    height: 50px;
    padding-right: 10px;
    vertical-align: top;
    background-color: #031633;
}

/* Add padding to body to prevent content from hiding under fixed navbar */
body {
    padding-top: 80px;
}

/* Responsive Design */
@media (max-width: 800px) {
    .options-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .options-container {
        grid-template-columns: 1fr;
    }
}

/* Dropdown Menu Items */
.nav-item.dropdown.mx-2 .dropdown-item {
    padding: 8px 16px;
    color: #ffffff;
    transition: all 0.2s ease-in-out;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    border-radius: 6px;
    background: transparent;
}

.nav-item.dropdown.mx-2 .dropdown-item:hover {
    background-color: rgba(2, 42, 106, 0.8);
    backdrop-filter: blur(5px);
}

/* Active states for all buttons */
.dropdown-option:active,
.filter-button:active,
.btn-npcprofile:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

/* Focus states for all buttons */
.dropdown-option:focus,
.filter-button:focus,
.btn-npcprofile:focus,
.profile-select-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 155, 182, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.2);
}

/* AI Service Toggle Button */
.ai-service-toggle {
    padding: 6px 12px;
    background-color: #5E0505;
    color: #ffffff;
    border: 1px solid rgba(138, 155, 182, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(180deg, 
                      rgba(255, 255, 255, 0.08) 0%,
                      rgba(255, 255, 255, 0) 100%);
}

.ai-service-toggle:hover {
    background-color: #4A0404;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.ai-service-toggle:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

.ai-service-toggle .model-name {
    color: #ffeb3b;
    margin-left: 4px;
}

/* Copy to all profiles button style */
.copy-to-all-profiles-btn {
    color: #FFFFFF; 
    cursor: pointer; 
    font-size: 13px; 
    display: inline-block; 
    position: relative; 
    background-color: rgba(85, 95, 109, 0.9);
    border: 1px solid rgba(138, 155, 182, 0.3);
    padding: 6px 12px; 
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease-in-out;
    margin-left: 1em;
    background-image: linear-gradient(180deg, 
                      rgba(255, 255, 255, 0.08) 0%,
                      rgba(255, 255, 255, 0) 100%);
}

.copy-to-all-profiles-btn:hover {
    background-color: rgba(75, 85, 99, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.copy-to-all-profiles-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

/* Configuration Depth Buttons */
.config-depth-btn {
    margin-top: 5px;
    font-weight: 500;
    border: 1px solid rgba(138, 155, 182, 0.3);
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    color: #000000;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(180deg, 
                      rgba(255, 255, 255, 0.08) 0%,
                      rgba(255, 255, 255, 0) 100%);
}

.config-depth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.config-depth-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

.config-depth-btn.basic {
    background-color: rgba(255, 193, 7, 0.8);
}

.config-depth-btn.basic:hover {
    background-color: rgba(204, 154, 5, 0.9);
}

.config-depth-btn.advanced {
    background-color: rgba(253, 126, 20, 0.8);
}

.config-depth-btn.advanced:hover {
    background-color: rgba(211, 102, 13, 0.9);
}

.config-depth-btn.experimental {
    background-color: rgba(220, 53, 69, 0.8);
    border: 2px solid rgba(255, 87, 34, 0.8);
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    animation: warningPulse 2s infinite;
    position: relative;
}

@keyframes warningPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.4),
                    inset 0 1px rgba(255, 255, 255, 0.1);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 87, 34, 0),
                    inset 0 1px rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0),
                    inset 0 1px rgba(255, 255, 255, 0.1);
    }
}

.config-depth-btn.experimental:hover {
    background-color: rgba(180, 31, 46, 0.9);
    border-color: rgba(255, 87, 34, 1);
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.config-depth-btn.experimental:before {
    content: "⚠️";
}

.config-depth-btn.active {
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* View Contents Button */
.view-contents-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(0, 48, 176, 0.8);
    border: 1px solid rgba(138, 155, 182, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(180deg, 
                      rgba(255, 255, 255, 0.08) 0%,
                      rgba(255, 255, 255, 0) 100%);
    margin: 4px 0;
}

.view-contents-btn:hover {
    background-color: rgba(0, 38, 156, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px rgba(255, 255, 255, 0.15);
}

.view-contents-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px rgba(255, 255, 255, 0.1);
}

.view-contents-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 155, 182, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Social Links */
.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 0.8;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Responsive adjustments for social links */
@media (max-width: 768px) {
    .social-links {
        gap: 8px;
        margin-right: 10px;
    }
    
    .social-link img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 576px) {
    .social-links {
        gap: 6px;
        margin-right: 8px;
    }
    
    .social-link img {
        width: 18px;
        height: 18px;
    }
}
