/* ================================
   PC Gaming Hub - Main Stylesheet
   ================================ */

:root {
    --primary-color: #6366f1;
    --secondary-color: #818cf8;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
}

/* Force light text in dark theme */
[data-bs-theme="dark"] {
    --bs-body-color: #e2e8f0;
    --bs-body-bg: #0f172a;
    --bs-secondary-color: #94a3b8;
    --bs-tertiary-color: #64748b;
}

/* Override Bootstrap text utilities for dark theme */
.text-muted {
    color: #94a3b8 !important;
}

.text-secondary {
    color: #cbd5e1 !important;
}

.lead {
    color: #cbd5e1;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
}

p {
    color: #cbd5e1;
}

/* Card text */
.card-text {
    color: #94a3b8 !important;
}

.card-title {
    color: #e2e8f0 !important;
}

/* Dropdown menu dark */
.dropdown-menu {
    background-color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: var(--text-light);
}

.dropdown-item:hover {
    background-color: rgba(99, 102, 241, 0.2);
    color: white;
}

/* Table text */
.table {
    color: var(--text-light);
}

/* List items */
li {
    color: #cbd5e1;
}

/* Labels and small text */
label, .form-label {
    color: var(--text-light) !important;
}

small, .small {
    color: #94a3b8;
}

/* Fix bg-light section */
.bg-light {
    background-color: #1e293b !important;
}

.bg-light .text-muted {
    color: #64748b !important;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.navbar-brand i {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e1b4b 100%);
    padding: 4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-section .text-primary {
    color: var(--primary-color) !important;
}

.min-vh-50 {
    min-height: 30vh;
}

/* Tool Cards */
.tool-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.tool-icon i {
    font-size: 2rem;
    color: white;
}

.tool-card .card-title {
    color: var(--text-light);
    font-weight: 600;
}

.tool-card .card-text {
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Stats Section */
.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Ad Placeholder */
.ad-banner {
    width: 728px;
    max-width: 100%;
    height: 90px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

/* Footer */
footer {
    margin-top: auto;
}

footer h5, footer h6 {
    color: var(--text-light);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Forms */
.form-control, .form-select {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.form-control:focus, .form-select:focus {
    background: var(--card-bg);
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Results Cards */
.result-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
}

.result-card.success {
    border-color: var(--success);
}

.result-card.warning {
    border-color: var(--warning);
}

.result-card.danger {
    border-color: var(--danger);
}

/* Progress Bars */
.progress {
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem;
}

.progress-bar.bg-success {
    background: var(--success) !important;
}

.progress-bar.bg-warning {
    background: var(--warning) !important;
}

.progress-bar.bg-danger {
    background: var(--danger) !important;
}

/* Comparison Table */
.compare-table {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
}

.compare-table th {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-light);
    font-weight: 600;
    padding: 1rem;
}

.compare-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.autocomplete-item:hover {
    background: rgba(99, 102, 241, 0.2);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .ad-banner {
        height: 50px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
