/* KoldFlame Gaming Platform */
:root {
    --kf-primary: #085cfc;
    --kf-primary-hover: #0650d4;
    --kf-primary-light: rgba(8, 92, 252, 0.1);
    --kf-secondary: #1a1d23;
    --kf-success: #10b981;
    --kf-warning: #f59e0b;
    --kf-danger: #ef4444;
    --kf-dark: #0f1117;
    --kf-darker: #0a0c10;
    --kf-light: #ffffff;
    --kf-border: #2d3139;
    --kf-card-bg: #1a1d23;
    --kf-surface: #252932;
    --kf-text-primary: #ffffff;
    --kf-text-secondary: #94a3b8;
    --kf-text-muted: #64748b;
}

body {
    background: linear-gradient(135deg, var(--kf-darker) 0%, var(--kf-dark) 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--kf-text-primary);
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--kf-text-primary) !important;
    letter-spacing: -0.02em;
}

.navbar {
    background: rgba(26, 29, 35, 0.95) !important;
    border-bottom: 1px solid var(--kf-border);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.nav-link {
    color: var(--kf-text-secondary) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--kf-text-primary) !important;
}

/* Game Cards */
.game-card {
    background: var(--kf-card-bg);
    border: 1px solid var(--kf-border);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    text-decoration: none;
    color: inherit;
}

.game-card .wishlist-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.game-card .wishlist-btn:hover {
    background: var(--kf-primary);
    transform: scale(1.1);
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    border-color: rgba(8, 92, 252, 0.3);
}

.game-card .card-img-top {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Removed zoom animation as requested */

.game-card .card-body {
    padding: 1rem;
    background: var(--kf-card-bg);
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.game-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.game-card .card-text {
    color: var(--kf-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.game-card .discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--kf-success) 0%, #059669 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.game-card .owned-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--kf-primary) 0%, var(--kf-primary-hover) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(8, 92, 252, 0.4);
}

.game-card .preorder-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--kf-warning) 0%, #e8b808 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-tag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-original {
    text-decoration: line-through;
    color: #6b7280;
    font-size: 0.9rem;
}

.price-current {
    color: var(--kf-success);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Sidebar Sections */
.sidebar-section {
    background: var(--kf-darker);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--kf-border);
}

/* Height matching for trailer and sidebar */
.trailer-sidebar-row {
    align-items: stretch;
}

.trailer-sidebar-row .col-lg-4 {
    display: flex;
    flex-direction: column;
}

.trailer-sidebar-row .col-lg-8 .content-section {
    display: flex;
    flex-direction: column;
}

.trailer-sidebar-row .col-lg-8 .ratio {
    aspect-ratio: 16/9;
    width: 100%;
}

.sidebar-combined {
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(56.25vw * 0.625); /* Match 16:9 aspect ratio of trailer */
}

.sidebar-combined .sidebar-section {
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-combined .sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-combined .sidebar-section .sidebar-content,
.sidebar-combined .sidebar-section .language-table {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Ensure proper heights on large screens */
@media (min-width: 992px) {
    .sidebar-combined {
        max-height: calc((100vw - 3rem) * 0.625 * 0.5625); /* Approximate trailer height */
    }
}

.sidebar-title {
    color: var(--kf-text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    
}

/* Language Table */
.language-table {
    font-size: 0.9rem;
}

.language-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--kf-border);
    margin-bottom: 0.5rem;
}

.language-col {
    text-align: center;
    font-weight: 600;
    color: var(--kf-text-secondary);
    font-size: 0.8rem;
}

.language-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.375rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.language-row:last-child {
    border-bottom: none;
}

.language-row .language-col {
    text-align: center;
    color: var(--kf-success);
    font-weight: 500;
}

.language-name {
    color: var(--kf-text-secondary);
    font-size: 0.9rem;
    padding-left: 0;
}

/* Achievements Sidebar */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.achievements-scrollable {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.achievements-scrollable::-webkit-scrollbar {
    width: 6px;
}

.achievements-scrollable::-webkit-scrollbar-track {
    background: var(--kf-darker);
    border-radius: 3px;
}

.achievements-scrollable::-webkit-scrollbar-thumb {
    background: var(--kf-border);
    border-radius: 3px;
}

.achievements-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--kf-text-secondary);
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--kf-border);
}

.achievement-item.unlocked {
    background: rgba(8, 92, 252, 0.1);
    border-color: rgba(8, 92, 252, 0.3);
}

.achievement-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--kf-border);
    color: var(--kf-text-secondary);
    font-size: 0.9rem;
}

.achievement-item.unlocked .achievement-icon {
    background: var(--kf-primary);
    color: white;
}

.achievement-content {
    flex: 1;
    min-width: 0;
}

.achievement-name {
    color: var(--kf-text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.achievement-desc {
    color: var(--kf-text-secondary);
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Buttons */
.btn-kf-primary {
    background: var(--kf-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(8, 92, 252, 0.25);
}

.btn-kf-primary:hover {
    background: var(--kf-primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(8, 92, 252, 0.35);
}

.btn-kf-secondary {
    background: transparent;
    border: 1px solid var(--kf-border);
    color: var(--kf-text-primary);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-kf-secondary:hover {
    background: var(--kf-surface);
    border-color: var(--kf-primary);
    color: var(--kf-text-primary);
    transform: translateY(-1px);
}

.btn-launcher {
    background: var(--kf-success);
    border: none;
    color: var(--kf-dark);
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn-launcher:hover {
    background: #00e67a;
    color: var(--kf-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--kf-darker) 0%, var(--kf-dark) 50%, var(--kf-secondary) 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 8px 24px rgba(8, 92, 252, 0.3));
}

.hero-visual {
    position: relative;
    padding: 2rem;
}

.hero-graphics {
    position: relative;
    height: 200px;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(8, 92, 252, 0.1);
    border: 2px solid rgba(8, 92, 252, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kf-primary);
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.floating-icon-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon-2 {
    top: 60%;
    right: 20%;
    animation-delay: 1s;
}

.floating-icon-3 {
    bottom: 10%;
    left: 30%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="1"/></g></svg>');
    opacity: 0.3;
}

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

/* Featured Games */
.featured-section {
    padding: 4rem 0;
}

/* Container spacing */
.container {
    max-width: 1400px;
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}

/* Page headers */
.page-header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--kf-border);
    margin-bottom: 3rem;
}

.section-title {
    color: var(--kf-text-primary);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    color: var(--kf-text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Layout Components */
.content-section {
    background: var(--kf-card-bg);
    border: 1px solid var(--kf-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Game Details */
.game-header {
    background: var(--kf-card-bg);
    border: 1px solid var(--kf-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.game-cover {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.rating-stars {
    color: var(--kf-accent);
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--kf-darker);
    border-radius: 8px;
    border: 1px solid var(--kf-border);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--kf-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-top: 5px;
}

/* Reviews */
.review-item {
    background: var(--kf-dark);
    border: 1px solid var(--kf-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-meta {
    flex: 1;
}

.review-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.review-date {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* Forms */
.form-control {
    background: var(--kf-surface);
    border: 1px solid var(--kf-border);
    color: var(--kf-text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--kf-surface);
    border-color: var(--kf-primary);
    box-shadow: 0 0 0 0.2rem rgba(8, 92, 252, 0.15);
    color: var(--kf-text-primary);
}

.form-control::placeholder {
    color: var(--kf-text-muted);
}

.form-select {
    background: var(--kf-surface);
    border: 1px solid var(--kf-border);
    color: var(--kf-text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    background: var(--kf-surface);
    border-color: var(--kf-primary);
    box-shadow: 0 0 0 0.2rem rgba(8, 92, 252, 0.15);
    color: var(--kf-text-primary);
}

.form-label {
    color: var(--kf-text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-card {
    background: var(--kf-dark);
    border: 1px solid var(--kf-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Search Results */
#searchResults {
    max-height: 300px;
    overflow-y: auto;
    z-index: 1050;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--kf-border);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--kf-darker);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--kf-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Achievements */
.achievement-item {
    background: var(--kf-dark);
    border: 1px solid var(--kf-border);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    border-color: var(--kf-success);
    background: rgba(16, 185, 129, 0.1);
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.achievement-icon.unlocked {
    background: var(--kf-success);
    color: white;
}

.achievement-icon.locked {
    background: var(--kf-border);
    color: #6b7280;
}

/* Profile Stats */
.profile-stats {
    background: var(--kf-dark);
    border: 1px solid var(--kf-border);
    border-radius: 12px;
    padding: 25px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--kf-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .game-header {
        padding: 20px;
    }
    
    .navbar-collapse .navbar-nav {
        text-align: center;
    }
    
    .d-flex.me-3 {
        width: 100% !important;
        margin: 10px 0 !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--kf-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--kf-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--kf-primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Logo Styling */
.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: white !important;
}

/* Logo Hover Menu */
.logo-dropdown {
    position: relative;
}

.logo-hover-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--kf-darker);
    border: 1px solid var(--kf-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo-dropdown:hover .logo-hover-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.dropdown-column {
    display: flex;
    flex-direction: column;
}

.dropdown-header {
    color: var(--kf-text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--kf-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--kf-text-secondary);
    text-decoration: none;
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--kf-primary);
    color: white;
    text-decoration: none;
}

/* Toast Notifications */
.toast {
    background: var(--kf-dark);
    border: 1px solid var(--kf-border);
    color: var(--kf-light);
}

.toast-header {
    background: var(--kf-darker);
    border-bottom: 1px solid var(--kf-border);
}

/* Video placeholder styling */
.video-placeholder {
    min-height: 300px;
    border: 2px dashed var(--kf-border);
}

.video-placeholder:hover {
    border-color: var(--kf-primary);
    background: rgba(8, 92, 252, 0.05);
}

/* News image styling */
.game-card .news-image {
    aspect-ratio: 21/9 !important;
    width: 100%;
    object-fit: cover;
}

.news-card-image-container {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.news-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1rem 1rem;
    z-index: 2;
}

.news-title-text {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

/* News content styling */
.news-content {
    line-height: 1.7;
    color: var(--kf-text-secondary);
}

.news-content p {
    margin-bottom: 1.5rem;
}

.news-content strong, .news-content b {
    color: var(--kf-text-primary);
    font-weight: 600;
}

.news-content em, .news-content i {
    font-style: italic;
    color: var(--kf-text-muted);
}

.news-content h1, .news-content h2, .news-content h3, 
.news-content h4, .news-content h5, .news-content h6 {
    color: var(--kf-text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.news-content h1 { font-size: 2rem; }
.news-content h2 { font-size: 1.75rem; }
.news-content h3 { font-size: 1.5rem; }

.news-content ul, .news-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.news-content li {
    margin-bottom: 0.5rem;
}

.news-content a {
    color: var(--kf-primary);
    text-decoration: none;
}

.news-content a:hover {
    color: var(--kf-accent);
    text-decoration: underline;
}

.news-content blockquote {
    background: var(--kf-darker);
    border-radius: 8px;
    margin: 1.5rem 0;
}

.news-content pre {
    background: var(--kf-darker) !important;
    border: 1px solid var(--kf-border);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.news-content code {
    background: var(--kf-darker) !important;
    color: var(--kf-accent);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.news-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--kf-border), transparent);
    margin: 2rem 0;
}

.news-content .embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    margin: 1.5rem 0;
}

.news-content .embed-responsive iframe {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.news-content .embed-responsive::before {
    display: block;
    content: "";
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}
