/* rscripts.net Clone - Dark Theme */
/* Override Bootstrap styles with !important */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;
    --bg-accent: #1f2937;
    
    /* Text Colors */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --text-accent: #58a6ff;
    
    /* Brand Colors */
    --primary-color: #238636;
    --primary-hover: #2ea043;
    --secondary-color: #7c3aed;
    --secondary-hover: #8b5cf6;
    --accent-color: #f85149;
    --accent-hover: #ff6b6b;
    
    /* Status Colors */
    --success-color: #238636;
    --warning-color: #d29922;
    --danger-color: #f85149;
    --info-color: #0969da;
    
    /* Border Colors */
    --border-color: #30363d;
    --border-light: #21262d;
    --border-dark: #484f58;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    /* Other */
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
    --transition-fast: all 0.15s ease-in-out;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif !important;
    line-height: 1.5 !important;
    color: var(--text-primary) !important;
    background-color: var(--bg-primary) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.75rem 0 !important;
}

.navbar.bg-dark {
    background-color: var(--bg-secondary) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
    background-color: var(--bg-hover);
    text-decoration: none;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--bg-accent);
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-input {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    width: 100%;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-fast);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

/* Modern Script Page Styles */
.script-hero {
    background: linear-gradient(135deg, #1c2128 0%, #21262d 50%, #161b22 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #30363d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.script-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffa726);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.script-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: #21262d;
}

.script-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease;
    display: block;
    opacity: 1;
    visibility: visible;
}

.script-detail-image:hover {
    transform: scale(1.05);
}

.script-image-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.script-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge-featured {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a1a;
}

.badge-mobile {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.badge-key {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-popular {
    background: linear-gradient(135deg, #ffa726, #ff7043);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.script-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f0f6fc;
    line-height: 1.2;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.script-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(33, 38, 45, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8b949e;
    font-size: 14px;
    font-weight: 500;
}

.meta-item i {
    color: #58a6ff;
    font-size: 16px;
}

.meta-item a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-item a:hover {
    color: #79c0ff;
}

.script-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #c9d1d9;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(13, 17, 23, 0.4);
    border-radius: 12px;
    border-left: 4px solid #58a6ff;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-modern {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-like {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-like:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    color: white;
    text-decoration: none;
}

.btn-view {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-download:hover {
    color: white;
    text-decoration: none;
}

.modern-card {
    background: linear-gradient(135deg, #1c2128 0%, #21262d 100%);
    border: 1px solid #30363d;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.modern-card-header {
    background: linear-gradient(135deg, #21262d, #161b22);
    border-bottom: 1px solid #30363d;
    padding: 20px;
    position: relative;
}

.modern-card-header h5 {
    color: #f0f6fc;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-card-header i {
    color: #58a6ff;
    font-size: 20px;
}

.modern-card-body {
    padding: 25px;
    color: #c9d1d9;
}

.code-container {
    background: #0d1117;
    border-radius: 12px;
    border: 1px solid #30363d;
    position: relative;
    overflow: hidden;
}

.code-header {
    background: linear-gradient(135deg, #21262d, #1c2128);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
}

.code-language {
    color: #58a6ff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.copy-button {
    background: linear-gradient(135deg, #238636, #2ea043);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: linear-gradient(135deg, #2ea043, #238636);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(35, 134, 54, 0.3);
}

.script-code {
    background: #0d1117;
    color: #e6edf3;
    padding: 20px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(121, 192, 255, 0.05));
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(88, 166, 255, 0.2);
    border-color: rgba(88, 166, 255, 0.4);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #58a6ff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.comment-item {
    background: rgba(33, 38, 45, 0.4);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: rgba(33, 38, 45, 0.6);
    border-color: #484f58;
}

.comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #58a6ff, #4493f8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 15px;
}

.sidebar-card {
    background: linear-gradient(135deg, #161b22 0%, #1c2128 100%);
    border: 1px solid #30363d;
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .script-title {
        font-size: 2rem;
    }
    
    .script-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .script-detail-image {
        height: 200px;
    }
    
    .script-image-overlay {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 10px;
        justify-content: center;
    }
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background-color: #22262e !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition-fast) !important;
    overflow: hidden !important;
}

/* List group items */
.list-group-item {
    background-color: #22262e !important;
    border-color: #2d323e !important;
}

.list-group-item:hover {
    background-color: #2d323e !important;
}

.card-body {
    background-color: #22262e !important;
    color: var(--text-secondary) !important;
}

.card-header {
    background-color: #2d323e !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.card-footer {
    background-color: #2d323e !important;
    border-top: 1px solid var(--border-color) !important;
}

.card:hover {
    border-color: var(--border-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.25rem;
    color: var(--text-secondary);
}

.card-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
}

/* Script Cards */
.script-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    transition: var(--transition-fast);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.script-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.script-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.script-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.script-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.script-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.script-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.script-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Forms */
.form-control {
    background-color: #2d323e;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.1);
}

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

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

.form-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: rgba(35, 134, 54, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(248, 81, 73, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(210, 153, 34, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-info {
    background-color: rgba(9, 105, 218, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

/* Tables */
.table {
    background-color: #22262e;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table th {
    background-color: #2d323e;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem;
}

.table td {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem;
    background-color: #22262e;
}

.table tbody tr:hover {
    background-color: #2d323e;
}

/* Code Blocks */
pre, code {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

pre {
    padding: 1rem;
    overflow-x: auto;
}

code {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.page-link:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-dark);
    color: var(--text-primary);
    text-decoration: none;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--text-secondary);
}

.footer h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Utility Classes */
.text-muted {
    color: var(--text-muted) !important;
}

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

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

.bg-dark {
    background-color: var(--bg-secondary) !important;
}

.bg-darker {
    background-color: var(--bg-tertiary) !important;
}

.border-dark {
    border-color: var(--border-color) !important;
}

/* Game Cards */
.game-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-dark);
}

.game-image {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.game-placeholder {
    height: 200px;
    background-color: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.game-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.game-placeholder span {
    font-size: 0.875rem;
    opacity: 0.7;
}

.game-card .card-body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.game-card .card-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
}

.game-card .card-title a {
    color: var(--text-primary);
    font-weight: 600;
}

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

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .script-card, .game-card {
        margin-bottom: 1rem;
    }
    
    .script-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .script-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.125rem 0;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-dark);
}

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

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

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Hover Effects */
.hover-lift {
    transition: var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Focus Styles */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.2);
}

/* Custom Components */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Bootstrap Overrides */
.bg-white {
    background-color: var(--bg-secondary) !important;
}

.bg-light {
    background-color: var(--bg-tertiary) !important;
}

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

.text-muted {
    color: var(--text-muted) !important;
}

.container {
    background-color: transparent !important;
}

.container-fluid {
    background-color: transparent !important;
}

/* Override Bootstrap's default white backgrounds */
main {
    background-color: var(--bg-primary) !important;
}

section {
    background-color: transparent !important;
}

/* Ensure all Bootstrap components use dark theme */
.bg-body {
    background-color: var(--bg-primary) !important;
}

.bg-body-secondary {
    background-color: var(--bg-secondary) !important;
}

.bg-body-tertiary {
    background-color: var(--bg-tertiary) !important;
}

/* Script Images */
.script-image {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 8px 8px 0 0 !important;
    transition: transform 0.2s ease !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    max-width: none !important;
}

.script-card:hover .script-image {
    transform: scale(1.02);
}

/* Script Placeholder */
.script-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-hover) 100%);
    border: 2px dashed var(--border-color);
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.script-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.script-placeholder span {
    font-size: 0.875rem;
    font-weight: 500;
}

.script-card:hover .script-placeholder {
    background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(35, 134, 54, 0.1) 100%);
    border-color: var(--primary-color);
}

/* Featured Script Images */
.featured-script-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.featured-script-card:hover .featured-script-image {
    transform: scale(1.05);
}

/* Script Detail Page Images */
.script-detail-image {
    width: 100%;
    max-width: 500px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

/* Responsive Images */
@media (max-width: 768px) {
    .script-image,
    .featured-script-image {
        height: 150px;
    }
    
    .script-detail-image {
        height: 200px;
    }
}

/* Ensure script images are properly visible */
.script-image, .dark-script-image {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* ==== DARK THEME STYLES ==== */

/* Dark Hero Section */
.dark-hero-section {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(88, 166, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(35, 134, 54, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.dark-hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 20px;
    color: #58a6ff;
    font-size: 14px;
    font-weight: 500;
}

.dark-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #f0f6fc;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #58a6ff 0%, #238636 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark-hero-subtitle {
    font-size: 1.25rem;
    color: #8b949e;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.dark-btn-primary {
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
}

.dark-btn-primary:hover {
    background: linear-gradient(135deg, #2ea043 0%, #238636 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 134, 54, 0.4);
    color: white;
}

.dark-btn-outline {
    background: transparent;
    border: 2px solid #58a6ff;
    color: #58a6ff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dark-btn-outline:hover {
    background: #58a6ff;
    color: #0d1117;
    transform: translateY(-2px);
}

/* Dark Stats */
.dark-stats-container {
    padding: 20px;
}

.dark-stat-card {
    background: rgba(33, 38, 45, 0.6);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dark-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #58a6ff, transparent);
}

.dark-stat-card:hover {
    transform: translateY(-5px);
    border-color: #58a6ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #58a6ff, #238636);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.dark-stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f0f6fc;
    margin-bottom: 8px;
}

.dark-stat-card .stat-label {
    color: #8b949e;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-trend {
    color: #238636;
    font-size: 12px;
    font-weight: 600;
}

/* Dark Featured Section */
.dark-featured-section {
    background: #0d1117;
    position: relative;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    color: #ffd700;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.dark-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 16px;
}

.dark-section-subtitle {
    color: #8b949e;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.dark-script-card {
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.dark-script-card:hover {
    transform: translateY(-8px);
    border-color: #58a6ff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.card-image-container {
    position: relative;
    overflow: hidden;
}

.dark-script-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
}

.featured-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark-script-card:hover .card-hover-overlay {
    opacity: 1;
}

.dark-script-card:hover .dark-script-image {
    transform: scale(1.1);
}

.dark-card-body {
    padding: 20px;
}

.dark-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.dark-card-title a {
    color: #f0f6fc;
    transition: color 0.3s ease;
}

.dark-card-title a:hover {
    color: #58a6ff;
}

.card-rating {
    margin-bottom: 12px;
}

.dark-card-text {
    color: #8b949e;
    line-height: 1.5;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    color: #58a6ff;
    font-size: 18px;
}

.author-name {
    color: #8b949e;
    font-size: 14px;
    font-weight: 500;
}

.script-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    color: #6e7681;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
