/* *****************************************************
    ChaoticaDigital Dark Theme
    Primary Color: #00B4D8 (Cyan)
    Background: #0d1117 / #161b22
***************************************************** */

/* ========== ROOT VARIABLES ========== */
:root {
    --primary-color: #00B4D8;
    --primary-hover: #0096c7;
    --primary-dark: #0077b6;
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2128;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --success-color: #238636;
    --danger-color: #da3633;
    --warning-color: #d29922;
}

/* ========== GLOBAL STYLES ========== */
body {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--primary-hover);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

/* ========== HEADER SECTION ========== */
#header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

#header .logo img {
    max-height: 50px !important;
    width: auto !important;
}

#header .logo-text {
    color: var(--text-primary) !important;
    font-size: 24px;
    font-weight: 700;
}

#header .top-nav {
    margin: 0;
    padding: 0;
}

#header .top-nav li a {
    color: var(--text-secondary) !important;
    font-size: 14px;
}

#header .top-nav li a:hover {
    color: var(--primary-color) !important;
}

#header .top-nav .btn {
    background: var(--primary-color) !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
}

#header .top-nav .btn:hover {
    background: var(--primary-hover) !important;
}

/* ========== MAIN NAVIGATION ========== */
#main-menu {
    background: var(--bg-dark) !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-main {
    background: transparent !important;
    border: none !important;
    margin-bottom: 0;
}

.navbar-main .navbar-nav > li > a {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 15px 20px;
    transition: all 0.2s ease;
}

.navbar-main .navbar-nav > li > a:hover,
.navbar-main .navbar-nav > li.active > a {
    color: var(--primary-color) !important;
    background: transparent !important;
}

.navbar-main .dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 8px 0;
}

.navbar-main .dropdown-menu > li > a {
    color: var(--text-secondary) !important;
    padding: 10px 20px;
}

.navbar-main .dropdown-menu > li > a:hover {
    background: var(--bg-card-hover) !important;
    color: var(--primary-color) !important;
}

/* Mobile menu toggle */
.navbar-toggle {
    border-color: var(--border-color) !important;
}

.navbar-toggle .icon-bar {
    background-color: var(--text-primary) !important;
}

/* ========== HERO SECTION (Homepage) ========== */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.80) 0%, rgba(0, 20, 40, 0.70) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
}

.hero-section > .container > p,
.hero-section .hero-content > p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 30px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
}

.hero-badge {
    background: rgba(0, 180, 216, 0.2);
    border: 1px solid rgba(0, 180, 216, 0.5);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.hero-badge i {
    color: var(--primary-color);
}

.hero-section .btn-hero {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-section .btn-hero:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.4);
    color: #fff;
}

/* Featured announcement */
.featured-announcement {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px 25px;
    margin: 30px auto;
    max-width: 1200px;
    text-align: left;
}

.featured-announcement .badge-new {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 10px;
}

.featured-announcement h4 {
    display: inline;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.featured-announcement p {
    margin: 10px 0 0;
    font-size: 14px;
}

/* ========== GAMES GRID ========== */
.games-section {
    padding: 50px 0;
}

.games-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 0 15px;
}

@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.15);
}

.game-card a {
    display: block;
    text-decoration: none;
}

.game-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-card-hover);
}

@media (max-width: 768px) {
    .game-card-image {
        height: 120px;
    }
}

.game-card-title {
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.game-card:hover .game-card-title {
    color: var(--primary-color);
}

/* ========== MAIN BODY ========== */
#main-body:has(.main-content:empty),
#main-body .main-content:empty {
    display: none;
}

#main-body {
    min-height: auto;
}

/* ========== PANELS & CARDS ========== */
.panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.panel-default > .panel-heading {
    background: var(--bg-card-hover) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px 8px 0 0 !important;
}

.panel-body {
    color: var(--text-secondary);
}

.panel-primary > .panel-heading {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* ========== FORMS ========== */
.form-control {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 6px;
    padding: 10px 15px;
    height: auto;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1) !important;
}

.form-control::placeholder {
    color: var(--text-secondary) !important;
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-default {
    background: var(--bg-card-hover) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 6px;
}

.btn-default:hover {
    background: var(--bg-card) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-success {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
}

.btn-danger {
    background: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
}

/* ========== TABLES ========== */
.table {
    color: var(--text-primary);
}

.table > thead > tr > th {
    background: var(--bg-card-hover) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.table > tbody > tr > td {
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-secondary);
}

.table > tbody > tr:hover > td {
    background: var(--bg-card-hover) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: var(--bg-card) !important;
}

/* ========== ALERTS ========== */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-info {
    background: rgba(0, 180, 216, 0.15) !important;
    color: var(--primary-color) !important;
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background: rgba(35, 134, 54, 0.15) !important;
    color: #3fb950 !important;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(218, 54, 51, 0.15) !important;
    color: #f85149 !important;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(210, 153, 34, 0.15) !important;
    color: #d29922 !important;
    border-left: 4px solid var(--warning-color);
}

/* ========== SIDEBAR ========== */
.sidebar .list-group {
    background: transparent;
}

.sidebar .list-group-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    margin-bottom: 2px;
    border-radius: 6px !important;
}

.sidebar .list-group-item:hover,
.sidebar .list-group-item.active {
    background: var(--bg-card-hover) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* ========== FOOTER ========== */
#footer {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color);
    padding: 40px 0 30px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand img {
    max-height: 40px;
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 300px;
}

.footer-links h5 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

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

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-card-hover);
    border-radius: 50%;
    color: var(--text-secondary);
    margin-right: 10px;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

#footer .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.2s ease;
}

#footer .back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* ========== BREADCRUMBS ========== */
.breadcrumb {
    background: transparent !important;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb > li {
    color: var(--text-secondary);
}

.breadcrumb > li a {
    color: var(--primary-color);
}

.breadcrumb > .active {
    color: var(--text-secondary);
}

/* ========== LABELS & BADGES ========== */
.label-default {
    background: var(--bg-card-hover) !important;
    color: var(--text-secondary) !important;
}

.label-primary {
    background: var(--primary-color) !important;
}

.label-success {
    background: var(--success-color) !important;
}

.label-warning {
    background: var(--warning-color) !important;
    color: #000 !important;
}

.label-danger {
    background: var(--danger-color) !important;
}

.label-info {
    background: var(--primary-color) !important;
}

/* ========== PAGINATION ========== */
.pagination > li > a,
.pagination > li > span {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

.pagination > li > a:hover {
    background: var(--bg-card-hover) !important;
    color: var(--primary-color) !important;
}

.pagination > .active > a,
.pagination > .active > span {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* ========== MODALS ========== */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-header .close {
    color: var(--text-secondary) !important;
    opacity: 1;
}

.modal-title {
    color: var(--text-primary) !important;
}

.modal-body {
    color: var(--text-secondary);
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
}

/* ========== WELL ========== */
.well {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* ========== ANNOUNCEMENTS ========== */
.announcement-single {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.announcement-single h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.announcement-single h3 a {
    color: var(--text-primary);
}

.announcement-single h3 a:hover {
    color: var(--primary-color);
}

.announcement-single blockquote {
    border-left: 3px solid var(--primary-color);
    padding: 10px 20px;
    margin: 0;
    background: var(--bg-card-hover);
    border-radius: 0 8px 8px 0;
}

.announcement-single blockquote p {
    margin: 0;
    font-size: 14px;
}

/* ========== DROPDOWNS (Language Chooser etc) ========== */
.popover {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
}

.popover-title {
    background: var(--bg-card-hover) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.popover-content {
    color: var(--text-secondary);
}

.popover.bottom > .arrow:after {
    border-bottom-color: var(--bg-card) !important;
}

/* ========== STORE / CART SPECIFIC ========== */
.store-product {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.store-product:hover {
    border-color: var(--primary-color);
}

/* ========== KNOWLEDGEBASE ========== */
.kb-article-list a {
    display: block;
    padding: 12px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.kb-article-list a:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 15px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .hero-content > p {
        font-size: 1.1rem;
    }
    
    .hero-badges {
        gap: 10px;
    }
    
    .hero-badge {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .hero-section .btn-hero {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .games-section {
        padding: 30px 0;
    }
    
    .games-section h2 {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: 20px;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
}
