@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body, h1, h2, h3, h4, h5, h6, p, label, input, button, .ancient-title, .ancient-text, .login-label, .login-input, .login-btn, .form-control, .navbar, .footer, .btn, .lead, .welcome, .feature, .update, .profile, .download, .about, .contact, .home, .text, .title, .subtitle, .section, .container, .row, .col, .card, .divider, .nav, .main, .body, .form, .input, .label, .message, .validation, .content, .header, .footer, .link, .icon, .logo {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
    color: #fff !important;
}

body {
    background-color: var(--main-black);
    color: #fff;
}

.ancient-title {
    color: var(--main-red-light) !important;
    text-shadow: 2px 2px 8px rgba(139,0,0,0.5);
    font-weight: bold;
    letter-spacing: 2px;
}

.ancient-btn, .btn-primary {
    color: #fff !important;
}

.ancient-btn.btn-outline {
    color: #fff !important;
}

.ancient-btn.btn-outline:hover {
    color: var(--main-red-light) !important;
}

.ancient-btn.btn-gold, .btn-primary {
    color: #fff !important;
}

.ancient-btn.btn-gold:hover, .btn-primary:hover {
    color: #fff !important;
}


.ancient-text, .login-label, .login-btn, .form-control, .lead {
    color: #ffffff !important;
}

.login-input, .form-control, .ancient-form-control {
    background: #181A1B !important;
    color: #fff !important;
}

.login-input:hover, .login-input:focus,
.form-control:hover, .form-control:focus,
.ancient-form-control:hover, .ancient-form-control:focus {
    background: #fff !important;
    color: #111 !important;
    border-color: #fff !important;
}

a, .btn-link {
    color: #d4af37;
}

.navbar {
    background-color: #111111;
    border-bottom: 2px solid #d4af37;
}

.navbar-brand, .nav-link, .navbar-text {
    color: #d4af37 !important;
}

.btn-primary {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #1e1e1e;
}

.btn-primary:hover {
    background-color: #b89024;
    border-color: #b89024;
}

footer {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #111111;
    color: #d4af37;
    text-align: center;
    border-top: 1px solid #d4af37;
}

@font-face {
    font-family: 'Bauhaus93';
    src: url('../fonts/CindieMono-D') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Aptos';
    src: url('../fonts/RedHatMono[wght].ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bauhaus93', sans-serif !important;
}

p {
    font-family: 'Aptos', sans-serif !important;
}

/* Conquer Unleashed Theme */
:root {
    --main-black: #111111;
    --main-black-2: #181818;
    --main-black-3: #232323;
    --main-red: #8B0000;
    --main-red-dark: #5a0000;
    --main-red-light: #B22222;
    --main-text: #F2F2F2;
    --main-accent: #B22222;
}

body {
    background-color: var(--main-black);
    color: var(--main-text);
    font-family: 'Cinzel', serif;
}

.ancient-container {
    background: linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)),
                url('/images/background-pattern.png');
    border: 2px solid var(--main-red-light);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    padding: 2rem;
    margin: 2rem 0;
}

.ancient-btn, .btn-primary {
    background: linear-gradient(135deg, var(--main-black-3), var(--main-red-dark));
    color: var(--main-red-light);
    border: 2px solid var(--main-red-light);
    border-radius: 8px;
    padding: 0.8rem 2rem;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139,0,0,0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.ancient-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(212, 175, 55, 0.2),
        transparent
    );
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ancient-btn:hover, .btn-primary:hover {
    background: linear-gradient(135deg, var(--main-red-dark), var(--main-red-light));
    color: var(--main-text);
    border-color: var(--main-red-light);
    box-shadow: 0 8px 25px rgba(139,0,0,0.25);
}

.ancient-btn:hover::before {
    left: 100%;
}

.ancient-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.ancient-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.ancient-btn i {
    transition: transform 0.3s ease;
}

.ancient-btn:hover i {
    transform: scale(1.1);
}

/* Button Sizes */
.ancient-btn.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.ancient-btn.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Button Variants */
.ancient-btn.btn-outline {
    background: transparent;
    border: 2px solid var(--main-red-light);
    color: var(--main-red-light);
}

.ancient-btn.btn-outline:hover {
    background: var(--main-red-light);
    color: var(--main-text);
}

.ancient-btn.btn-gold, .btn-primary {
    background: linear-gradient(135deg, var(--main-red-light), var(--main-red-dark));
    color: var(--main-text);
    border: none;
}

.ancient-btn.btn-gold:hover, .btn-primary:hover {
    background: linear-gradient(135deg, var(--main-red-dark), var(--main-red-light));
    color: var(--main-text);
}

/* Disabled State */
.ancient-btn:disabled,
.ancient-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ancient-btn:disabled:hover,
.ancient-btn.disabled:hover {
    background: linear-gradient(135deg, var(--main-black-3), var(--main-red-dark));
    color: var(--main-red-light);
    transform: none;
    box-shadow: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ancient-btn {
        padding: 0.7rem 1.8rem;
        font-size: 0.9rem;
    }
    
    .ancient-btn.btn-lg {
        padding: 0.9rem 2.2rem;
        font-size: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .ancient-btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
    }
    
    .ancient-btn:active {
        background: linear-gradient(135deg, var(--main-red-dark), var(--main-red-light));
        color: var(--main-text);
        transform: translateY(1px);
    }
}

/* Reset and Base Carousel Styles */
.ancient-carousel {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 31.25%; /* 600px height for 1920px width (600/1920 = 0.3125) */
    border: 3px solid var(--main-red-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    background-color: var(--main-black);
}

.ancient-carousel .carousel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ancient-carousel .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.ancient-carousel .carousel-item.active {
    display: block;
}

.ancient-carousel .carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ancient-carousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.9));
    padding: 1.5rem;
    border-top: 1px solid var(--main-red-light);
    z-index: 2;
}

/* Carousel Controls */
.ancient-carousel .carousel-control-prev,
.ancient-carousel .carousel-control-next {
    width: 10%;
    opacity: 0.8;
    z-index: 3;
}

.ancient-carousel .carousel-control-prev-icon,
.ancient-carousel .carousel-control-next-icon {
    background-color: rgba(26, 26, 26, 0.5);
    border-radius: 50%;
    padding: 1.5rem;
    background-size: 50%;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .ancient-carousel {
        padding-bottom: 40%; /* Taller on smaller screens */
    }
}

@media (max-width: 992px) {
    .ancient-carousel {
        padding-bottom: 50%;
    }
}

@media (max-width: 768px) {
    .ancient-carousel {
        padding-bottom: 60%;
    }
    
    .ancient-carousel .carousel-caption {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .ancient-carousel {
        padding-bottom: 75%;
    }
    
    .ancient-carousel .carousel-caption h3 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }
    
    .ancient-carousel .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
}

/* Remove any conflicting styles */
.carousel,
.carousel-inner,
.carousel-item,
.carousel-item img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

.ancient-text {
    color: var(--main-text);
    font-size: 1.1rem;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.ancient-divider {
    border-top: 2px solid var(--main-red-light);
    margin: 1.5rem 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--main-black);
}

::-webkit-scrollbar-thumb {
    background: var(--main-red-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--main-red-light);
}

/* Navbar Styling */
.ancient-navbar {
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.85));
    border-bottom: 1px solid var(--main-red-light);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.1);
    padding: 1rem 0;
}

.ancient-navbar .navbar-brand {
    font-family: 'Cinzel', serif;
    font-weight: bold;
}

.ancient-navbar .navbar-brand img {
    filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.3));
}

.ancient-nav-link {
    color: var(--main-red-light) !important;
    font-family: 'Cinzel', serif;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.ancient-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--main-red-light);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.ancient-nav-link:hover {
    color: var(--main-red-light) !important;
}

.ancient-nav-link:hover::after {
    width: 80%;
}

.ancient-navbar .navbar-toggler {
    border-color: var(--main-red-light);
}

.ancient-navbar .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(212, 175, 55, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Footer Styling */
.ancient-footer {
    background: linear-gradient(to top, rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.85));
    border-top: 1px solid var(--main-red-light);
    box-shadow: 0 -2px 10px rgba(212, 175, 55, 0.1);
}

.ancient-footer .ancient-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
}

/* Main Content Area */
main {
    min-height: calc(100vh - 200px); /* Adjust based on your footer height */
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .ancient-navbar .navbar-collapse {
        background: rgba(26, 26, 26, 0.95);
        border: 1px solid var(--main-red-light);
        border-radius: 8px;
        margin-top: 1rem;
        padding: 1rem;
    }

    .ancient-nav-link::after {
        display: none;
    }

    .ancient-container {
        margin: 1rem 0;
        padding: 1rem;
    }
}

.hero-title {
    background: rgba(0,0,0,0.55) !important;
    color: #fff !important;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.85), 0 0 2px #B22222;
    padding: 0.25em 0.75em;
    border-radius: 8px;
    display: inline-block;
    font-weight: 900;
    font-size: 2.8rem;
    letter-spacing: 2px;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
}
