/* CSRaid WWW Site - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    background-color: #000;
    color: #fff;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.8);
}

/* Page Background */
.page-background {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.content-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    min-height: 100vh;
}

/* Navigation Enhancements */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Card Enhancements */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.2) !important;
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 500;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.display-4 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

/* Form Enhancements */
.form-control, .form-select {
    border-radius: 8px;
    border-width: 1px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Accordion Enhancements */
.accordion-button {
    font-weight: 600;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Modal Enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

/* Table Enhancements */
.table-dark {
    --bs-table-bg: rgba(0, 0, 0, 0.3);
}

.table-dark td, .table-dark th {
    border-color: rgba(255, 255, 255, 0.1);
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Pagination Enhancements */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobile Menu Enhancements */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: rgba(33, 37, 41, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-shadow: none;
        transform: none !important;
        animation: slideDown 0.3s ease;
    }
    
    .navbar-nav .dropdown-menu.show {
        display: block;
    }
    
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 6px;
        margin: 2px 8px;
        transition: all 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .navbar-nav .dropdown-item.active {
        background-color: var(--primary-color);
        color: #fff;
    }
    
    .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
        transition: transform 0.2s ease;
    }
    
    .navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }
    
    /* Language and social dropdown specific styles */
    .navbar-nav #languageDropdown + .dropdown-menu {
        min-width: 150px;
    }
    
    .navbar-nav #socialDropdown + .dropdown-menu {
        min-width: 180px;
    }
    
    /* Touch-friendly tap areas */
    .navbar-nav .nav-link,
    .navbar-nav .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure dropdowns work on both mobile and desktop */
.navbar-nav .dropdown:hover .dropdown-menu {
    display: none; /* Disable hover on touch devices */
}

@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .navbar-nav .dropdown-menu {
        background-color: rgba(33, 37, 41, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }
    
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        transition: all 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .navbar-nav .dropdown-item.active {
        background-color: var(--primary-color);
        color: #fff;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading Animations */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    background-color: rgba(33, 37, 41, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.toast-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Blog Content Styling */
.blog-content h1, .blog-content h2, .blog-content h3,
.blog-content h4, .blog-content h5, .blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.blog-content h1:first-child,
.blog-content h2:first-child,
.blog-content h3:first-child {
    margin-top: 0;
}

.blog-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.blog-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background-color: rgba(13, 110, 253, 0.1);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.blog-content code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.blog-content pre {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-content pre code {
    background: none;
    padding: 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.blog-content ul, .blog-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* Social Links */
.social-item {
    transition: all 0.3s ease;
}

.social-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

/* Footer Enhancements */
footer {
    backdrop-filter: blur(10px);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .page-background {
        background-attachment: scroll;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
}

/* Dark Theme Adjustments */
.text-light-emphasis {
    color: rgba(255, 255, 255, 0.75) !important;
}

.border-secondary {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.bg-secondary {
    background-color: rgba(108, 117, 125, 0.3) !important;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.box-shadow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.border-radius-lg {
    border-radius: 12px;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Print Styles */
@media print {
    .navbar, .btn, footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}