/*
   Variables
 */
:root {
    /* --- Modern Color Palette --- */
    --clr-bg: #030712;
    --clr-bg-alt: #0b1120;
    --clr-surface: rgba(30, 41, 59, 0.5);
    --clr-surface-brd: rgba(255, 255, 255, 0.08);
    
    --clr-primary: #3b82f6; /* Blue 500 */
    --clr-primary-glow: rgba(59, 130, 246, 0.4);
    --clr-secondary: #0ea5e9; /* Sky 500 (Light Blue) */
    --clr-secondary-glow: rgba(14, 165, 233, 0.4);
    --clr-accent: #06b6d4; /* Cyan 500 */
    --clr-accent-glow: rgba(6, 182, 212, 0.4);
    
    --clr-text-main: #f8fafc;
    --clr-text-muted: #94a3b8;

    --accent-10: rgba(59, 130, 246, 0.1);
    --accent-15: rgba(59, 130, 246, 0.15);
    --accent-20: rgba(59, 130, 246, 0.2);
    --accent-30: rgba(59, 130, 246, 0.3);
    --accent-40: rgba(59, 130, 246, 0.4);
    --accent-50: rgba(59, 130, 246, 0.5);
    
    /* --- Spacing System --- */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    
    /* --- Effects --- */
    --br-xl: 1rem;
    --br-2xl: 1.5rem;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass: blur(12px);

    /* --- Legacy Aliases for Compatibility --- */
    --bg-dark: var(--clr-bg);
    --bg-darker: var(--clr-bg-alt);
    --bg-card: var(--clr-surface);
    --theme-blue-primary: var(--clr-primary);
    --theme-blue-light: var(--clr-secondary);
    --theme-accent: var(--clr-primary);
    --text-primary: var(--clr-text-main);
    --text-secondary: var(--clr-text-muted);
    --text-highlight: var(--clr-primary);
}

/* ========================================
   Global Styles
   ======================================== */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--clr-bg);
    color-scheme: dark;
}

body {
    background: var(--clr-bg);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.07) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--clr-text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

::selection {
    background: var(--clr-primary-glow);
    color: var(--clr-text-main);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--clr-surface-brd);
    border-radius: 100px;
    border: 2px solid var(--clr-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--clr-primary);
}

img {
    transition: all 0.3s ease;
}


/* ========================================
   Utilities
   ======================================== */
.text-muted {
    color: var(--clr-text-muted) !important;
}

.text-primary {
    color: var(--clr-primary) !important;
}

.text-secondary {
    color: var(--clr-secondary) !important;
}

.bg-surface {
    background: var(--clr-surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--clr-surface-brd);
}

.glass-card {
    background: var(--clr-surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--clr-surface-brd);
    border-radius: var(--br-xl);
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: var(--clr-primary-glow);
    background: rgba(30, 41, 59, 0.7);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Components
   ======================================== */

/* --- Buttons --- */
.btn {
    font-weight: 600;
    transition: var(--transition-base);
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
}

.btn-primary {
    background: var(--clr-primary);
    border: 1px solid var(--clr-primary);
    color: var(--clr-bg);
}

.btn-primary:hover {
    background: transparent;
    color: var(--clr-primary);
    box-shadow: 0 0 20px var(--clr-primary-glow);
}

.btn-outline-light {
    border: 1px solid var(--clr-surface-brd);
    background: var(--clr-surface);
    backdrop-filter: var(--glass);
    color: var(--clr-text-main);
}

.btn-outline-light:hover {
    background: var(--clr-text-main);
    color: var(--clr-bg);
    border-color: var(--clr-text-main);
}

.btn-success {
    background: var(--clr-primary);
    border: 1px solid var(--clr-primary);
    color: var(--clr-bg);
}

.btn-success:hover {
    background: transparent;
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    box-shadow: 0 0 20px var(--clr-primary-glow);
}

/* --- Badges --- */
.badge {
    padding: 0.5em 1em;
    border-radius: 100px;
    font-weight: 600;
}

.badge-primary-soft {
    background: var(--clr-primary-glow);
    color: var(--clr-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}



/* ========================================
   Layout Sections
   ======================================== */

/* --- Navbar --- */
.navbar-container {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: var(--glass);
    border: 1px solid var(--clr-surface-brd) !important;
    border-radius: var(--br-xl) !important;
    padding: var(--sp-2) var(--sp-4);
}

.brand-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--clr-text-muted) !important;
    font-weight: 600;
    padding: var(--sp-2) var(--sp-4) !important;
    border-radius: var(--sp-2);
    transition: var(--transition-base);
}

.nav-link:hover, .nav-link.active {
    color: var(--clr-text-main) !important;
    background: var(--clr-surface-brd);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    overflow: visible;
}

.text-gradient {
    background: linear-gradient(to right, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fw-800 { font-weight: 800; }
.ls-1 { letter-spacing: 0.1em; }

.stat-item {
    padding: var(--sp-4);
    border-left: 2px solid var(--clr-primary-glow);
}

.hero-visual {
    z-index: 1;
}

.rounded-2xl { border-radius: var(--br-2xl); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }

.hero-glow-1 {
    position: absolute;
    top: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: var(--clr-primary-glow);
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
}

.hero-glow-2 {
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: var(--clr-secondary-glow);
    filter: blur(120px);
    z-index: -1;
    opacity: 0.3;
}


/* --- Features Section --- */
.features-section {
    position: relative;
}

.feature-card {
    background: var(--clr-surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--clr-surface-brd) !important;
    border-radius: var(--br-xl);
    padding: var(--sp-8) var(--sp-6);
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--clr-primary-glow) !important;
    background: rgba(30, 41, 59, 0.7);
}

.icon-box {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--br-xl);
    background: var(--clr-primary-glow);
    color: var(--clr-primary);
    margin-bottom: var(--sp-6);
    transition: var(--transition-base);
}

.feature-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--clr-primary);
    color: var(--clr-bg);
}

/* --- Plugins Section --- */
.plugin-card {
    background: var(--clr-surface);
    backdrop-filter: var(--glass);
    border: 1px solid var(--clr-surface-brd) !important;
    border-radius: var(--br-xl);
    overflow: hidden;
    transition: var(--transition-base);
}

.plugin-card:hover {
    transform: translateY(-12px);
    border-color: var(--clr-secondary-glow) !important;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

.plugin-header {
    padding: var(--sp-2);
    background: var(--clr-bg-alt);
}

.plugin-img {
    border-radius: var(--br-xl);
    transition: var(--transition-base);
}

.plugin-card:hover .plugin-img {
    transform: scale(1.02);
}

.plugin-body {
    padding: var(--sp-6);
}


/* --- CTA Section --- */
.cta-section {
    position: relative;
}

.cta-card {
    background: linear-gradient(135deg, var(--clr-primary-glow) 0%, var(--clr-secondary-glow) 100%);
    border: 1px solid var(--clr-surface-brd);
    border-radius: var(--br-2xl);
    padding: var(--sp-16) var(--sp-8);
    backdrop-filter: var(--glass);
    overflow: hidden;
}

.portfolio-cta {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.25rem;
    padding: clamp(2rem, 4vw, 3.5rem);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.96) 100%);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    text-align: left !important;
}

.portfolio-cta::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    pointer-events: none;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.portfolio-cta-kicker {
    display: inline-block;
    margin-bottom: 0.9rem;
    padding: 0.28rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(37, 99, 235, 0.12);
    color: #93c5fd;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portfolio-cta-btn {
    border-color: rgba(203, 213, 225, 0.55) !important;
    color: #e2e8f0 !important;
}

.portfolio-cta-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

/* --- Footer --- */
.footer {
    background: var(--clr-bg);
    border-top: 1px solid var(--clr-surface-brd) !important;
    padding-top: var(--sp-16);
    padding-bottom: var(--sp-8);
}

.footer-link {
    color: var(--clr-text-muted);
    text-decoration: none;
    transition: var(--transition-base);
    display: block;
    margin-bottom: var(--sp-2);
}

.footer-link:hover {
    color: var(--clr-primary);
    transform: translateX(4px);
}

.social-btn {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sp-3);
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-brd);
    color: var(--clr-text-muted);
    transition: var(--transition-base);
}

.social-btn:hover {
    background: var(--clr-primary);
    color: var(--clr-bg);
    transform: translateY(-4px);
}


/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes borderRotate {
    0% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.1;
    }
}


/* ========================================
   Media Queries
   ======================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--accent-20);
    }

    .nav-link {
        margin: 0.25rem 0;
    }
}

/* ========================================
   Carousel Improvements
   ======================================== */

.carousel-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Better carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 10%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control{
    filter: drop-shadow(0 0 10px var(--text-white));
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--text-white);
    background-color: transparent;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.carousel-indicators [data-bs-target].active {
    opacity: 1;
    background-color: var(--theme-blue-light);
    transform: scale(1.2);
}

.floating-card:has(.carousel) {
    padding: 0.75rem;
    border: 2px solid var(--clr-primary-glow);
    border-radius: var(--br-xl);
    background: var(--clr-surface);
    backdrop-filter: var(--glass);
}

/* ========================================
   DataTables Improvements
   ======================================== */


/* Table Container & Text */
.table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--accent-20);
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Header Styling */
table.dataTable thead th {
    border-bottom: 2px solid var(--theme-accent) !important;
    color: var(--text-highlight);
}


.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(255,255,255, 0.01) !important;
    color: var(--white-80);
    box-shadow: none !important;
}

.table-striped>tbody>tr:hover>* {
    background-color: var(--accent-15) !important;
    color: var(--text-white);
}

/* Bottom Border */
table.dataTable td {
    border-color: var(--accent-30) !important;
    vertical-align: middle;
}

/* Pagination Buttons */
.page-item .page-link {
    background-color: var(--bg-darker);
    border-color: var(--accent-30);
    color: var(--text-secondary);
}

.page-item.disabled .page-link {
    background-color: var(--bg-darker);
    border-color: var(--accent-10);
    color: var(--text-secondary);
    opacity: 0.5;
}

.page-item.active .page-link {
    background-color: var(--theme-blue-primary);
    border-color: var(--theme-blue-primary);
    color: white;
}

.page-item:not(.active) .page-link:hover {
    background-color: var(--accent-40);
    color: white;
}

/* ========================================
   Breadcrumb
   ======================================== */

.breadcrumb-item a {
    color: var(--theme-blue-light);
    transition: color 0.3s ease;
}
.breadcrumb-item a:hover {
    color: var(--accent-50);
}
.breadcrumb-item.active {
    color: var(--text-secondary);
}
.breadcrumb-item+.breadcrumb-item::before {
    color: var(--accent-50);
}

/* ========================================
   Portfolio Section Improvements
   ======================================== */
.nav-tabs {
    border-bottom: 2px solid var(--accent-20);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    transition: all 0.3s ease;
}

/* Portfolio Card Tweaks */
.portfolio-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-20);
    border-color: var(--theme-blue-light) !important;
}


/* ========================================
   About page
   ======================================== */

.server-card {
    background: rgba(33, 37, 41, 0.4); /* Semi-transparent */
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-20);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    position: relative;
    overflow: hidden;
}

.server-card:hover {
    transform: translateY(-8px);
    border-color: var(--theme-blue-light);
    background: rgba(33, 37, 41, 0.8);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.server-status {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.server-logo-wrapper {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* The glow behind the logo */
.logo-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-50) 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(15px);
    transition: all 0.4s ease;
    transform: scale(0.8);
    z-index: -1;
}

.server-card:hover .logo-glow {
    opacity: 0.6;
    transform: scale(1.5);
    background: radial-gradient(circle, var(--theme-blue-light) 0%, transparent 70%);
}

.server-img {
    max-width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
    transition: transform 0.4s ease;
}

.server-card:hover .server-img {
    transform: scale(1.1);
}

/* Blinking dot animation */
.blink {
    color: #27c93f !important;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
    }
}



/* ========================================
   Mac & Mobile Window Styles
   ======================================== */

.mac-window {
    background: var(--bg-darker);
    border-radius: 12px;
    border: 1px solid var(--accent-20);
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
}

.mac-window:hover {
    transform: translateY(-5px);
    border-color: var(--theme-blue-light);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.mac-header {
    background: var(--accent-15);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--accent-15);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.address-bar {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    flex-grow: 1;
    text-align: center;
    opacity: 0.7;
}

.mac-content {
    height: 300px;
    overflow: hidden;
    position: relative;
    background: var(--bg-dark);
}


.scroll-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 4s ease-in-out;
    object-fit: cover;
    object-position: top;
}

.mac-window:hover .scroll-img {
    transform: translateY(calc(-100% + 300px));
}

/* Overlay Button */
.overlay-action {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 18, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mac-window:hover .overlay-action {
    opacity: 1;
}

/* Mobile Window Styles */

.mobile-window {
    background: var(--bg-dark);
    border-radius: 24px;
    border: 6px solid var(--bg-card);
    overflow: hidden;
    position: relative;
    max-width: 320px;
    height: 450px;
    transition: all 0.4s ease;
}

.mobile-window:hover {
    transform: translateY(-5px);
    border-color: var(--theme-blue-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-header {
    background: var(--bg-darker);
    padding: 10px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--accent-15);
    z-index: 2;
    position: relative;
}

/* Camera Hole */
.camera-hole {
    width: 40px;
    height: 6px;
    background: #000;
    border-radius: 10px;
    opacity: 0.5;
}

.mobile-content {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.scroll-img-mobile {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 4s ease-in-out;
    object-fit: cover;
}

.mobile-window:hover .scroll-img-mobile {
    transform: translateY(calc(-100% + 450px));
}

.mobile-window:hover .overlay-action {
    opacity: 1;
}






