/* DLCraft Studios - Dark Theme CSS */
/* Author: DLCraft Studios */
/* Version: 1.0.0 */

/* ============================================
   FORCE DARK MODE
   ============================================ */
html, body {
    background-color: #0f0f23 !important;
    color: #f8f9fa !important;
}

html[data-theme="dark"], 
html.dark-mode {
    background-color: #0f0f23 !important;
    color-scheme: dark !important;
}

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    /* Dark Theme Colors */
    --primary-color: #a855f7;
    --primary-dark: #7c3aed;
    --secondary-color: #fbbf24;
    --accent-color: #ec4899;
    
    --bg-dark: #0f0f23;
    --bg-dark-alt: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1e2d4f;
    
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    
    --border-color: #2d3748;
    --border-light: #374151;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-gold: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-dark: #f8f9fa;
    --bg-dark-alt: #e9ecef;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f5;
    
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    
    --border-color: #dee2e6;
    --border-light: #e9ecef;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

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

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: color var(--transition-fast);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: all var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   DROPDOWN MENU - DARK THEME
   ============================================ */
.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 0.5rem !important;
    margin-top: 0.5rem !important;
}

.dropdown-item {
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    transition: all var(--transition-fast) !important;
    font-weight: 500 !important;
}

.dropdown-item:hover {
    background: rgba(168, 85, 247, 0.1) !important;
    color: var(--primary-color) !important;
    transform: translateX(5px) !important;
}

.dropdown-item:active {
    background: rgba(168, 85, 247, 0.2) !important;
    color: var(--primary-color) !important;
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
    margin: 0.5rem 0 !important;
    opacity: 0.5 !important;
}

.dropdown-item i {
    color: var(--text-secondary) !important;
    transition: color var(--transition-fast) !important;
}

.dropdown-item:hover i {
    color: var(--primary-color) !important;
}

.dropdown-item.text-danger:hover i {
    color: #ef4444 !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
    z-index: 0;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

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

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   CARDS
   ============================================ */
.card,
.bg-dark-card {
    background: #1e2231 !important;
    border: 1px solid #8b5cf6 !important;
    color: #ffffff !important;
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card p, .card span, .card div, .card label,
.bg-dark-card h1, .bg-dark-card h2, .bg-dark-card h3, .bg-dark-card h4, .bg-dark-card h5, .bg-dark-card h6,
.bg-dark-card p, .bg-dark-card span, .bg-dark-card div, .bg-dark-card label {
    color: #ffffff !important;
}

.card a,
.bg-dark-card a {
    color: #a855f7 !important;
}

.card .btn,
.bg-dark-card .btn {
    color: #ffffff !important;
}

.border-purple {
    border-color: #8b5cf6 !important;
}

.project-card,
.news-card,
.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    height: 100%;
}

.project-card:hover,
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-thumbnail,
.news-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-thumbnail img,
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-thumbnail img,
.news-card:hover .news-image img {
    transform: scale(1.1);
}

.badge-premium,
.badge-free,
.badge-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-premium {
    background: rgba(251, 191, 36, 0.9);
    color: #000;
}

.badge-free {
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
}

.badge-featured {
    background: rgba(168, 85, 247, 0.9);
    color: #fff;
    top: 45px;
}

.project-content,
.news-content {
    padding: 1.5rem;
}

.project-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.project-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

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

.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   SECTIONS
   ============================================ */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.bg-dark-alt {
    background: var(--bg-dark-alt);
}

/* ============================================
   FEATURES
   ============================================ */
.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

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

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.auth-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.auth-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.auth-header h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-dark) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.25) !important;
}

.form-control:disabled,
.form-control[disabled],
.form-select:disabled,
.form-select[disabled] {
    background: var(--bg-dark-alt) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
    opacity: 0.8 !important;
    cursor: not-allowed !important;
}

.input-group-text {
    background: var(--bg-dark-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Form Labels */
.form-label {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-dark-alt);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer p,
.footer li,
.footer h5,
.footer h6,
.footer .text-muted {
    color: #ffffff !important;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff !important;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #ffffff !important;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color) !important;
}

.contact-info,
.contact-info li {
    color: #ffffff !important;
}

.contact-info a {
    color: #ffffff !important;
}

.footer-bottom-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-bottom-links li {
    display: inline;
}

.footer-bottom-links a {
    color: #ffffff !important;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
}

.btn-back-to-top.show {
    display: flex;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* ============================================
   FILTERS & LIST GROUPS
   ============================================ */
.filters-card {
    background: #1e2231 !important;
    border: 1px solid #8b5cf6 !important;
    border-radius: 12px;
    padding: 1.5rem;
}

.filters-card h5,
.filters-card h6 {
    color: #ffffff !important;
}

.list-group-item {
    background: transparent !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: #8b5cf6 !important;
}

.list-group-item.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}

/* ============================================
   MODAL DARK MODE - FORCE DARK THEME
   ============================================ */
.modal-content {
    background: #1e2231 !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #fff !important;
}

.modal-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15)) !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.modal-title {
    color: #fff !important;
}

.modal-body {
    color: #fff !important;
}

.modal-body p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.modal-footer {
    border-top: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 1 !important;
}

.btn-close:hover {
    opacity: 0.8 !important;
}

.modal-backdrop {
    background-color: #000 !important;
    opacity: 0.85 !important;
}

.modal-backdrop.show {
    opacity: 0.85 !important;
}
