:root {
    /* Main Background & Base Text */
    --body-bg: #1E1B2E;          /* Dark slate background from your palette */
    --body-color: #F8FAFC;       /* Off-white/light gray text for high readability */

    /* Studio Accent Colors */
    --cassiopeia-color-primary: #7C3AED;  /* Vibrant studio purple for headers & buttons */
    --cassiopeia-color-link: #C4B5FD;     /* Soft lavender for links so they stand out on dark bg */
    --cassiopeia-color-hover: #7C3AED;    /* Purple hover state */

    /* Component & Card Backgrounds (Modules, menus, etc.) */
    --card-bg: #252236;                   /* Slightly lighter tint for depth */
    --card-color: #F8FAFC;
}

/* --- Layout Specific Overrides for Cassiopeia --- */

/* Fix the Header block to match the studio branding */
.container-header {
    background-color: #1E1B2E;
    background-image: none;               /* Removes default Joomla gradient */
    border-bottom: 2px solid #7C3AED;    /* Clean purple branding line under header */
}

/* Ensure menus and navigation match the palette */
.navbar {
    --j-navbar-bg: #1E1B2E;
    --j-navbar-color: #F8FAFC;
    --j-navbar-link-color: #C4B5FD;
    --j-navbar-link-hover-color: #7C3AED;
}

/* Adjust button text contrast */
.btn-primary {
    background-color: #7C3AED;
    border-color: #7C3AED;
    color: #F8FAFC;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #6324db;            /* Slightly deeper purple for button hover state */
    border-color: #6324db;
    color: #F8FAFC;
}

/* Card/Module container styling */
.card, .well {
    background-color: var(--card-bg);
    border: 1px solid rgba(124, 58, 237, 0.15); /* Subtle purple border border */
}

/* Footer styling */
.footer {
    background-color: #151322;            /* Darker tone for the footer area */
    color: #C4B5FD;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
}
/* Container for the entire footer row */
.studio-footer-container {
    display: flex;
    flex-direction: row;
    align-items: center;       /* Centers text and images vertically */
    justify-content: center;   /* Centers the entire group on the page */
    flex-wrap: wrap;           /* Allows wrapping on small mobile screens */
    gap: 20px;                 /* Space between items and dividers */
    width: 100%;
    padding: 10px 0;
}

/* Individual item alignment */
.footer-item {
    display: flex;
    align-items: center;
}

.copyright-text {
    font-size: 0.95rem;
    color: #C4B5FD;            /* Soft lavender from your palette */
}

/* The vertical divider line */
.footer-divider {
    width: 1px;
    height: 24px;              /* Height of the line match text size */
    background-color: rgba(124, 58, 237, 0.4); /* Subdued purple matching your theme */
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    .studio-footer-container {
        flex-direction: column; /* Stack vertically on phones */
        gap: 15px;
    }
    .footer-divider {
        width: 40px;            /* Turn lines horizontal on mobile */
        height: 1px;
    }
}


/* Scale down the header logo */
.navbar-brand img {
    max-height: 120px;   /* Adjust this pixel value until it looks right */
    width: auto;        /* Maintains the original aspect ratio automatically */
    object-fit: contain;
}

/* Optional: Clean up padding around the logo so the header isn't too tall */
.container-header {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Container holding the game boxes */
.studio-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;                 /* Space between the two boxes */
    margin: 30px 0;
    width: 100%;
}

/* Individual Game Box Styling */
.game-card {
    background-color: #252236; /* Slightly lighter box color for contrast */
    border: 1px solid rgba(124, 58, 237, 0.2); /* Subtle purple studio accent border */
    border-radius: 8px;        /* Matches the rounded logo frame look */
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes the button to the bottom evenly */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Game Title */
.game-card-title {
    color: #F8FAFC;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    padding-bottom: 8px;
}

/* Game Description */
.game-card-desc {
    color: #C4B5FD;            /* Soft studio lavender text */
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;              /* Makes text fill space so buttons align perfectly */
}

/* Action button area */
.game-card-action {
    display: flex;
    justify-content: center;   /* Centers the Google Play badge in the box */
    align-items: center;
}

.game-card-action img {
    transition: transform 0.2s ease;
}

/* Subtle interactive hover effect */
.game-card-action img:hover {
    transform: scale(1.03);    /* Slight pop when user hovers over badge */
}
/* Open Cassiopeia dropdowns smoothly on mouse hover */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0; /* Prevents a gap from closing the menu when moving the mouse down */
    }
}

/* ==========================================================================
   METISMENU DROPDOWN OVERRIDES (ATOMIC/SCI-FI THEME)
   ========================================================================== */

/* 1. The Submenu Dropdown Container Box */
ul.mod-menu ul.mm-collapse {
    background-color: #121214 !important; /* Deep dark background */
    border: 1px solid rgba(8, 197, 8, 0.2) !important; /* Thin neon green border */
    border-radius: 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    padding: 8px 0 !important;
    list-style: none !important;
}

/* 2. The Text Links Inside the Dropdown */
ul.mod-menu ul.mm-collapse li.metismenu-item a {
    color: #F8FAFC !important; /* Crisp white text */
     font-size: 0.9rem !important;
    padding: 10px 20px !important;
    display: block !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

/* 3. Hover State for the Links */
ul.mod-menu ul.mm-collapse li.metismenu-item a:hover {
    background-color: rgba(8, 197, 8, 0.1) !important; /* Low-opacity green tint */
    color: #08C508 !important; /* Vibrant neon green glow text */
    padding-left: 24px !important; /* Smooth right shift */
}

/* 4. Optional: Style the parent "Games" button to match when open */
.navbar-nav .metismenu-item button.dropdown-toggle {
     background: none !important;
    border: none !important;
    color: #C4B5FD !important; /* Lavender parent text */
}
