/* Enhanced Modern Styling */
:root {
    --primary-blue: #2563eb;
    --secondary-gray: #6b7280;
    --dark-bg: #1f2937;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
body {
    background: var(--gradient-bg);
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
}
#hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.5)), var(--gradient-bg);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 0;
    width: 100%;
    height: 20vh;
    background-size: cover;
    position: relative;
}
#hero:before {
    content: "";
    background: rgba(45, 53, 69, 0.7);
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0; /* Make sure overlay is behind content */
}
#hero .container {
    text-align: center;
    padding-top: 5px;
    position: relative;
    z-index: 1; /* Add z-index to be above overlay */
}
#hero h1 {
    color: white !important;
    position: relative;
    z-index: 2;
    pointer-events: auto; /* Ensure text is clickable */
}
@media (max-width: 992px) {
    #hero .container {
        padding-top: 0;
    }
}
@media (min-width: 1024px) {
    #hero {
        background-attachment: fixed;
    }
}
@media (max-width: 768px) {
    #hero {
        height: 8vh;
    }
    #hero h1,
    #hero .container h1,
    section#hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        color: #ffffff !important; /* Force white on mobile too */
    }
    #hero h2 {
        font-size: 18px;
        line-height: 22px;
    }
}
/* Enhanced Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}
.card-header {
    background: var(--dark-bg) !important;
    color: white !important;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-bottom: none;
    position: relative;
}
.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), #10b981);
}
.card-body {
    padding: 1.5rem;
}
/* Game Info Card Enhancements */
.game-info-card .card-img-top {
    border-radius: 12px;
    margin: 1rem;
    width: calc(100% - 2rem);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.game-info-card .card-img-top:hover {
    transform: scale(1.02);
}
.game-detail-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.game-detail-row:last-child {
    border-bottom: none;
}
.game-detail-label {
    font-weight: 600;
    color: var(--secondary-gray);
    min-width: 80px;
    margin-right: 1rem;
}
.game-detail-value {
    flex: 1;
    color: #374151;
}
/* Badge Styling */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
}
.bg-success { background: linear-gradient(45deg, #10b981, #059669) !important; }
.bg-warning { background: linear-gradient(45deg, #f59e0b, #d97706) !important; }
.bg-info { background: linear-gradient(45deg, #3b82f6, #2563eb) !important; }
/* Control Button Enhancements */
.button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.1rem;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    margin-bottom: 0.25rem;
}
/* Make buttons smaller if needed */
.button-container button {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    min-width: 0;
    white-space: nowrap;
    border: none;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.icon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    background: white;
    color: var(--primary-blue);
}
.icon-button:active {
    transform: translateY(0);
}
/* Compact Card for Joystick Controls */
.compact-card {
    max-width: 100%;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.compact-card .card-body {
    padding: 1.25rem;
}
.compact-card h6 {
    color: var(--dark-bg);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.compact-card ul {
    margin-bottom: 1rem;
}
.compact-card li {
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #4b5563;
}
/* Start Game Button */
.start-game-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}
/* Canvas Container */
#canvas_container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: #000;
}
#canvas {
    width: 100%;
    height: auto;
    display: block;
}
/* Progress Bar */
#progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    appearance: none;
    background: #e5e7eb;
    overflow: hidden;
}
#progress::-webkit-progress-bar {
    background: #e5e7eb;
    border-radius: 4px;
}
#progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--primary-blue), #10b981);
    border-radius: 4px;
}
/* Other Titles Section */
.other-titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.other-title-item {
    text-align: center;
    transition: transform 0.3s ease;
}
.other-title-item:hover {
    transform: translateY(-4px);
}
.other-title-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.other-title-item:hover img {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.other-title-item p {
    margin: 0.75rem 0 0 0;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
}
/* SID Player Card */
.sid-player-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
.sid-player-card .btn-group .btn {
    border-radius: 8px;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}
.sid-player-card .btn-group .btn:hover {
    transform: translateY(-1px);
}
/* Loading Animation */
#status {
    text-align: center;
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
}
/* Keyboard Button Enhancement */
.keyboardInput {
    background: linear-gradient(135deg, #374151, #1f2937) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.90rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}
.keyboardInput:hover {
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}
a {
    color: #141261;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Raleway", sans-serif;
}
/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/**
* Desktop Navigation 
*/
.navbar {
    padding: 0;
}
.navbar ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
}
.navbar li {
    position: relative;
}
.navbar a,
.navbar a:focus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 10px 30px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.3s;
}
.navbar a i,
.navbar a:focus i {
    font-size: 12px;
    line-height: 0;
    margin-left: 5px;
}
.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover>a {
    color: #ffc107;
}
.navbar .dropdown ul {
    display: block;
    position: absolute;
    left: 14px;
    top: calc(100% + 30px);
    margin: 0;
    padding: 10px 0;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    background: #fff;
    box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
    transition: 0.3s;
}
.navbar .dropdown ul li {
    min-width: 200px;
}
.navbar .dropdown ul a {
    padding: 10px 20px;
    font-size: 14px;
    text-transform: none;
    color: #414c64;
}
.navbar .dropdown ul a i {
    font-size: 12px;
}
.navbar .dropdown ul a:hover,
.navbar .dropdown ul .active:hover,
.navbar .dropdown ul li:hover>a {
    color: #ffc107;
}
.navbar .dropdown:hover>ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
}
.navbar .dropdown .dropdown ul {
    top: 0;
    left: calc(100% - 30px);
    visibility: hidden;
}
.navbar .dropdown .dropdown:hover>ul {
    opacity: 1;
    top: 0;
    left: 100%;
    visibility: visible;
}
@media (max-width: 1366px) {
    .navbar .dropdown .dropdown ul {
        left: -90%;
    }
    .navbar .dropdown .dropdown:hover>ul {
        left: -100%;
    }
}
/**
* Mobile Navigation 
*/
.mobile-nav-toggle {
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: none;
    line-height: 0;
    transition: 0.5s;
}
@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: block;
    }
    .navbar ul {
        display: none;
    }
}
.navbar-mobile {
    position: fixed;
    overflow: hidden;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(45, 53, 69, 0.9);
    transition: 0.3s;
    z-index: 999;
}
.navbar-mobile .mobile-nav-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
}
.navbar-mobile ul {
    display: block;
    position: absolute;
    top: 55px;
    right: 15px;
    bottom: 15px;
    left: 15px;
    padding: 10px 0;
    background-color: #fff;
    overflow-y: auto;
    transition: 0.3s;
}
.navbar-mobile a,
.navbar-mobile a:focus {
    padding: 10px 20px;
    font-size: 15px;
    color: #414c64;
}
.navbar-mobile a:hover,
.navbar-mobile .active,
.navbar-mobile li:hover>a {
    color: #ffc107;
}
.navbar-mobile .dropdown ul {
    position: static;
    display: none;
    margin: 10px 20px;
    padding: 10px 0;
    z-index: 99;
    opacity: 1;
    visibility: visible;
    background: #fff;
    box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
}
.navbar-mobile .dropdown ul li {
    min-width: 200px;
}
.navbar-mobile .dropdown ul a {
    padding: 10px 20px;
}
.navbar-mobile .dropdown ul a i {
    font-size: 12px;
}
.navbar-mobile .dropdown ul a:hover,
.navbar-mobile .dropdown ul .active:hover,
.navbar-mobile .dropdown ul li:hover>a {
    color: #ffc107;
}
.navbar-mobile .dropdown>.dropdown-active {
    display: block;
}
/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
    padding: 60px 0;
}
.section-bg {
    background-color: #B7BAC1;
}
.section-title {
    text-align: center;
    padding-bottom: 30px;
}
.section-title h2 {
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
}
.section-title h2::after {
    content: "";
    position: absolute;
    display: block;
    width: 50px;
    height: 3px;
    background: #ffc107;
    bottom: 0;
    left: calc(50% - 25px);
}
.section-title p {
    margin-bottom: 0;
    font-size: 14px;
    color: #aab3c7;
}
#footer {
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #444c6e;
    color: white;
    text-align: center;
}