/* Main Theme CSS - rtScript Dark Theme */
/* CSS Variables for consistent theming */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --accent-blue: #58a6ff;
    --accent-green: #238636;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --border-color: #30363d;
}

/* Scrollbar Styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-hover) var(--bg-secondary);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

*::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

/* Base Body Styling */
body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Navbar Styling */
.navbar {
    background: rgba(22, 27, 34, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-blue) !important;
    transform: translateY(-1px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-blue);
    border-radius: 2px;
}

/* Modern Cards */
.card {
    background: rgba(33, 38, 45, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="2" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="2" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="25" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="25" cy="75" r="1" fill="%23ffffff" opacity="0.05"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background Utilities */
.bg-darker {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color);
}

/* Modern Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.4);
    background: linear-gradient(135deg, #4f96ff, #9333ea);
    cursor: pointer;
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
    cursor: pointer;
}

/* Ensure all buttons and links have pointer cursor */
.btn, a.btn, button {
    cursor: pointer !important;
}

a.btn:hover {
    cursor: pointer !important;
}

/* Form Controls */
.form-control {
    background: rgba(33, 38, 45, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(33, 38, 45, 0.9);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-primary);
}

.form-text {
    color: var(--text-secondary) !important;
}

/* Dropdown styling */
.form-select {
    background: rgba(33, 38, 45, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.input-group-text {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 400px;
}

.search-input {
    padding-left: 2.5rem;
    border-radius: 25px;
    background: rgba(33, 38, 45, 0.8);
    border: 1px solid var(--border-color);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 5;
}

/* Dropdowns */
.dropdown-menu {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent-blue);
}

/* Game/Script Cards */
.game-card, .script-card {
    background: rgba(33, 38, 45, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.game-card:hover, .script-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
}

.game-image, .script-image {
    transition: transform 0.4s ease;
    border-radius: 8px 8px 0 0;
}

.game-card:hover .game-image,
.script-card:hover .script-image {
    transform: scale(1.05);
}

.game-placeholder {
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-tertiary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.game-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

/* Badges and Tags */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-featured {
    background: linear-gradient(135deg, var(--accent-orange), #ef4444);
}

.badge-new {
    background: linear-gradient(135deg, var(--accent-green), #10b981);
}

.badge-popular {
    background: linear-gradient(135deg, var(--accent-purple), #ec4899);
}

/* Pagination */
.pagination .page-link {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
    margin: 0 2px;
    border-radius: 8px;
}

.pagination .page-link:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.pagination .page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Text Colors */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-secondary) !important; }

/* Alert Styling */
.alert {
    border: none;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .card:hover {
        transform: translateY(-3px);
    }
}