﻿:root {
    --primary-color: #1e293b;
    /* Slate 800 */
    --accent-color: #3b82f6;
    /* Blue 500 */
    --text-dark: #334155;
    /* Slate 700 */
    --text-light: #f8fafc;
    /* Slate 50 */
    --bg-light: #f1f5f9;
    /* Slate 100 */
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;



    /* Content Protection: Disable Text Selection */
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
    user-select: none;
    /* Standard */
}



/* Allow selection in inputs and textareas so forms work */
input,
textarea,
[contenteditable] {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    /* Reduced from 1.25rem */
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    gap: 0.75rem;
    line-height: 1;
    margin-right: 2.5rem;
}

.logo i {
    font-size: 1.8rem;
    color: var(--accent-color);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo span {
    color: var(--accent-color);
}

.logo-subtitle {
    color: var(--text-dark);
    transition: color 0.4s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* Unified Button Styles for Login and Chess */
.btn-login,
.btn-chess {
    position: relative;
    background: transparent;
    color: var(--text-dark) !important;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 90px;
    height: 38px;
    text-align: center;
    text-decoration: none;
    /* Ensure no underline */
}

.btn-chess {
    margin-left: 2.5rem;
    /* Now first, so big margin here */
}

.btn-login {
    margin-left: -15px;
    /* Pull closer to chess button */
}

.btn-login span,
.btn-chess span {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login .text-idle,
.btn-chess .text-idle {
    transform: translateY(0);
    opacity: 1;
    color: var(--text-dark);
}

.btn-login .text-hover,
.btn-chess .text-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 150%);
    opacity: 0;
    width: 100%;
    justify-content: center;
    color: var(--accent-color);
}

.btn-login:hover,
.btn-chess:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(0);
    box-shadow: none;
}

.btn-login:hover .text-idle,
.btn-chess:hover .text-idle {
    transform: translateY(-150%);
    opacity: 0;
}

.btn-login:hover .text-hover,
.btn-chess:hover .text-hover {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.btn-chess:active,
.btn-login:active {
    transform: translateY(0);
}

/* --- Home Navbar Scroll-Reactive Styles --- */
.navbar.home-navbar {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(15, 23, 42, 0.3); /* Dark glass background */
    backdrop-filter: blur(12px); /* Glass blur effect */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.15); /* Sleek separator line */
    box-shadow: none;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

/* Home Navbar Logo and Links Color at top (Transparent) */
.navbar.home-navbar .logo {
    color: var(--white); /* "Tahsin" text color */
    transition: color 0.4s ease;
}
/* Keep icon and last name brand colors */
.navbar.home-navbar .logo i {
    color: var(--accent-color);
    transition: color 0.4s ease;
}
.navbar.home-navbar .logo span {
    color: var(--accent-color);
    transition: color 0.4s ease;
}
.navbar.home-navbar .logo-subtitle {
    color: #cbd5e1 !important; /* Light gray for contrast on dark background */
    transition: color 0.4s ease;
}
.navbar.home-navbar .nav-links a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.4s ease;
}
.navbar.home-navbar .nav-links a:hover,
.navbar.home-navbar .nav-links a.active {
    color: var(--white);
}
.navbar.home-navbar .nav-links a::after {
    background-color: var(--white);
}
.navbar.home-navbar .menu-toggle {
    color: var(--white);
    transition: color 0.4s ease;
}

/* Home Navbar Buttons at top (Transparent) */
.navbar.home-navbar .btn-login,
.navbar.home-navbar .btn-chess {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white) !important;
    transition: all 0.4s ease;
}
.navbar.home-navbar .btn-login .text-idle,
.navbar.home-navbar .btn-chess .text-idle {
    color: var(--white);
    transition: color 0.4s ease;
}
.navbar.home-navbar .btn-login .text-hover,
.navbar.home-navbar .btn-chess .text-hover {
    color: var(--white);
    transition: color 0.4s ease;
}
.navbar.home-navbar .btn-login:hover,
.navbar.home-navbar .btn-chess:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--white);
}

/* Home Navbar when scrolled (Light Glassmorphic state) */
.navbar.home-navbar.scrolled {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(0, 0, 0, 0.08); /* Thicker line when scrolled */
    box-shadow: var(--shadow);
    padding: 0.5rem 0; /* Slightly thinner padding on scroll for premium feel */
}
.navbar.home-navbar.scrolled .logo {
    color: var(--primary-color);
}
.navbar.home-navbar.scrolled .logo i {
    color: var(--accent-color);
}
.navbar.home-navbar.scrolled .logo span {
    color: var(--accent-color);
}
.navbar.home-navbar.scrolled .logo-subtitle {
    color: var(--text-dark) !important;
}
.navbar.home-navbar.scrolled .nav-links a {
    color: var(--text-dark);
}
.navbar.home-navbar.scrolled .nav-links a:hover,
.navbar.home-navbar.scrolled .nav-links a.active {
    color: var(--accent-color);
}
.navbar.home-navbar.scrolled .nav-links a::after {
    background-color: var(--accent-color);
}
.navbar.home-navbar.scrolled .btn-login,
.navbar.home-navbar.scrolled .btn-chess {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--text-dark) !important;
}
.navbar.home-navbar.scrolled .btn-login .text-idle,
.navbar.home-navbar.scrolled .btn-chess .text-idle {
    color: var(--text-dark);
}
.navbar.home-navbar.scrolled .btn-login .text-hover,
.navbar.home-navbar.scrolled .btn-chess .text-hover {
    color: var(--accent-color);
}
.navbar.home-navbar.scrolled .btn-login:hover,
.navbar.home-navbar.scrolled .btn-chess:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}
.navbar.home-navbar.scrolled .menu-toggle {
    color: var(--text-dark);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--primary-color) 0%, #0f172a 100%);
    background-size: 100% 100%, 100% 100%;
    color: var(--white);
    padding: 5.2rem 1rem 1.5rem 1rem; /* Adjusted top padding to pull up subtitle and center it */
    text-align: center;
    position: relative;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content */
}

/* Digital Clock Widget - Expandable */
.hero-clock {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.hero-clock:hover,
.hero-clock.expanded {
    width: 165px;
    height: 165px;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
    transform: translateY(-3px);
}

.hero-clock::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #3b82f6);
    animation: rotateBorder 4s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-clock:hover::before,
.hero-clock.expanded::before {
    opacity: 1;
}

.hero-clock::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 50%;
    z-index: -1;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@keyframes rotateBorder {
    100% { transform: rotate(360deg); }
}

.clock-icon {
    font-size: 1.3rem;
    color: #60a5fa;
    position: absolute;
    transition: all 0.4s ease;
    z-index: 5;
}

.hero-clock:hover .clock-icon,
.hero-clock.expanded .clock-icon {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

.clock-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-clock:hover .clock-content,
.hero-clock.expanded .clock-content {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.clock-time {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(to right, #60a5fa, #c084fc, #60a5fa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shineText 3s linear infinite;
    line-height: 1.2;
    filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.4));
}

@keyframes shineText {
    to { background-position: 200% center; }
}

.clock-date {
    font-size: 0.55rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.3rem;
    position: relative;
    padding-top: 0.4rem;
    white-space: nowrap;
}

.clock-date::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), transparent);
}

/* Hero Right Menu Container */
.hero-right-menu {
    position: absolute;
    top: 53%;
    right: 1.5rem;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

/* Hero Social Sidebar */
.hero-social-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    padding: 1rem 0.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    width: 45px;
    align-items: center;
    transition: all 0.4s ease;
}

.hero-social-sidebar a {
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.hero-social-sidebar a:hover {
    background: transparent;
    transform: scale(1.35) translateY(-3px);
    box-shadow: none;
}

.hero-social-sidebar a:hover .fa-instagram {
    background: -webkit-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 6px rgba(225, 48, 108, 0.3));
}

.hero-social-sidebar a:hover .fa-facebook {
    color: #1877F2;
    filter: drop-shadow(0 4px 6px rgba(24, 119, 242, 0.3));
}

.hero-social-sidebar a:hover .fa-id-card {
    color: #10b981;
    filter: drop-shadow(0 4px 6px rgba(16, 185, 129, 0.3));
}

.hero-social-sidebar a:hover .fa-linkedin {
    color: #0A66C2;
    filter: drop-shadow(0 4px 6px rgba(10, 102, 194, 0.3));
}

.hero-social-sidebar a:hover .fa-graduation-cap {
    color: #4285F4;
    filter: drop-shadow(0 4px 6px rgba(66, 133, 244, 0.3));
}

.hero-social-sidebar a:hover .fa-book {
    color: #f97316;
    filter: drop-shadow(0 4px 6px rgba(249, 115, 22, 0.3));
}

.hero-social-sidebar a:hover .fa-orcid {
    color: #A6CE39;
    filter: drop-shadow(0 4px 6px rgba(166, 206, 57, 0.3));
}

.hero-social-sidebar a:hover .fa-envelope {
    color: #EA4335;
    filter: drop-shadow(0 4px 6px rgba(234, 67, 53, 0.3));
}

/* Games Widget Wrapper */
.hero-games-wrapper {
    position: relative;
    width: 45px;
    height: 45px;
    margin-top: 1.5rem;
}

/* Games Widget */
.hero-games {
    position: absolute;
    top: 0;
    right: 0;
}

.hero-games:hover,
.hero-games.expanded {
    width: 90px;
    height: 90px;
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.45);
    transform: translateY(-3px);
}

.hero-games::before {
    background: conic-gradient(transparent, transparent, transparent, #fbbf24);
}

@media (max-width: 768px) {
    .hero-right-menu {
        display: none;
    }
}


@media (max-width: 768px) {
    .hero-clock {
        display: none;
    }
}

/* Hero Section Typography & Layout */
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes profileFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.profile-img {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 14px 3px rgba(255, 255, 255, 0.8),
        0 0 35px 7px rgba(255, 255, 255, 0.4),
        0 7px 18px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    background-color: #cbd5e1;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: profileFloat 4s ease-in-out infinite;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1),
        0 0 55px 14px rgba(255, 255, 255, 0.6),
        0 14px 20px rgba(0, 0, 0, 0.3);
    animation-play-state: paused;
}

.hero-subtitle {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    /* Slate 400 */
    margin-bottom: 2.8rem; /* Increased margin-bottom to keep the lower profile elements in the same position */
    font-weight: 600;
}

.hero-profile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.hero-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0;
    padding-left: 1.2rem;
    border-left: 3px solid rgba(255, 255, 255, 0.45);
}

.hero-title {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    color: #ffffff !important;
    line-height: 1.3;
}

.hero-role {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.2rem;
    color: #60a5fa;
    font-weight: 600;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
}

@media (max-width: 768px) {
    .hero-profile-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-title-group {
        align-items: center;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-role {
        font-size: 1rem;
    }
}

/* Typewriter Effect */
.typewriter-wrapper {
    background: rgba(15, 23, 42, 0.6);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    backdrop-filter: blur(4px);
}

.typewriter-label {
    color: #cbd5e1;
}

.typewriter-text {
    color: var(--white);
    font-weight: 600;
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-color);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-desc {
    font-size: 1.1rem;
    color: #e2e8f0;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 1rem auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Social Proof Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.stat-item i {
    font-size: 1.8rem;
    color: #60a5fa;
    /* Blue 400 */
}

.stat-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #cbd5e1;
    text-align: center;
    max-width: 150px;
}

/* Particles Background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background-color: transparent;
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 2px solid var(--accent-color);
    transition: all 0.2s ease;
}

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

/* Main Content */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Lists */
.item-list {
    list-style: none;
}

.item-list li {
    background: var(--white);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.item-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.meta {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 1rem 0.5rem;
    /* Padding artırıldı */
    margin-top: auto;
    position: relative;
    /* Absolute positioning için container */
}

footer p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.social-links {
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

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

    .menu-toggle {
        display: block;
    }

    /* Prevent transparent top state color issues in expanded mobile menu on home navbar */
    .navbar.home-navbar .nav-links a {
        color: var(--text-dark);
    }
    .navbar.home-navbar .nav-links a:hover,
    .navbar.home-navbar .nav-links a.active {
        color: var(--accent-color);
    }
    .navbar.home-navbar .nav-links a::after {
        background-color: var(--accent-color);
    }
    .navbar.home-navbar .btn-login,
    .navbar.home-navbar .btn-chess {
        border-color: rgba(0, 0, 0, 0.2);
        color: var(--text-dark) !important;
    }
    .navbar.home-navbar .btn-login .text-idle,
    .navbar.home-navbar .btn-chess .text-idle {
        color: var(--text-dark);
    }
    .navbar.home-navbar .btn-login .text-hover,
    .navbar.home-navbar .btn-chess .text-hover {
        color: var(--accent-color);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Gallery Styles (Pro) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 260px;
    grid-auto-flow: dense;
    gap: 1.5rem;
    padding-bottom: 3rem;
}

@media (max-width: 1200px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr; }
}

/* Keep original portrait detection */
.gallery-grid a.portrait {
    grid-row: span 2;
}

.gallery-grid a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    background: #f8fafc;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 2px solid #1e293b;
}

.gallery-grid a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.gallery-grid a:hover::before {
    opacity: 1;
}

.gallery-grid a:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-grid a.portrait {
    grid-row: span 2;
}

.gallery-grid a.portrait img {
    object-fit: cover;
}

.gallery-grid a:hover img {
    transform: scale(1.08);
}

/* Pro Overlay HTML Content */
.gallery-item-info {
    position: absolute;
    inset: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
    pointer-events: none;
}

.gallery-tag {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: auto;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-grid a:hover .gallery-tag {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-info h3 {
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.1s;
}

.gallery-grid a:hover .gallery-item-info h3 {
    opacity: 1;
    transform: translateY(0);
}

.gallery-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
}

.gallery-grid a:hover .gallery-desc {
    opacity: 1;
    transform: translateY(0);
}

.gallery-icon-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-grid a:hover .gallery-icon-wrapper {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Gallery Item Styles */
.modal-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    height: 200px;
    position: relative;
    text-decoration: none;
    background-color: #f8fafc;
}

.modal-gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.3) 50%, rgba(15, 23, 42, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.modal-gallery-item:hover::before {
    opacity: 1;
}

.modal-gallery-item::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1rem 1rem 1rem;
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    z-index: 2;
}

.modal-gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.modal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15);
}

.modal-gallery-item:hover img {
    transform: scale(1.1);
}

/* Reveal Animations (for Homepage Announcements) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal:nth-child(2) {
    transition-delay: 0.3s;
}

.reveal:nth-child(3) {
    transition-delay: 0.5s;
}

/* Hero Fade-In Animations (Snappier Sequential) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-content i.fas.fa-university {
    animation-delay: 0.2s;
}

.hero-content .profile-img {
    animation-delay: 0.4s;
}

.hero-content h1 {
    opacity: 0;
    animation-delay: 0.7s;
}

.hero-content p {
    opacity: 0;
    animation-delay: 1.0s;
}

.hero-content .hero-actions {
    opacity: 0;
    animation-delay: 1.3s;
}

/* Specific button sizing and styling for Hero section only */
.hero .btn {
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb 0%, var(--accent-color) 100%);
    color: white;
}

.hero .btn-outline-white {
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.hero .btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Scroll to Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

#scrollTopBtn:hover {
    transform: translateY(-5px);
    background: #2563eb;
}

#scrollTopBtn.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Beautified See All Button */
.btn-outline {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent;
    font-size: 1rem;
    margin-top: 1rem;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline i {
    transition: transform 0.3s ease;
}

.btn-outline:hover i {
    transform: translateX(5px);
}

/* Modal Announcement Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    max-width: 1100px;
    /* Daha geniş ve sinematik görünüm */
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    background: transparent;
    border: none;
}

.modal-header h2 {
    display: none;
    /* Temiz görünüm için başlığı body içine alacağız */
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ffffff;
    border: 2px solid #1e293b;
    color: #1e293b;
    font-size: 1.5rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 0;
    color: white;
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
}

.ann-modal-split {
    display: flex;
    height: 100%;
    min-height: 450px;
}

.ann-modal-left {
    flex: 1.2;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, transparent 100%);
}

.ann-modal-right {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.ann-modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ann-modal-text {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
}

.ann-modal-container {
    padding: 2.5rem;
}

.modal-footer {
    display: none;
    /* Butonlar content içine CTA olarak gelecek */
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

.modal-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid #cbd5e1;
}

.modal-btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--accent-color);
}

@media (max-width: 900px) {
    .ann-modal-split {
        flex-direction: column-reverse;
        min-height: auto;
    }

    .ann-modal-left {
        padding: 2.5rem 2rem;
        text-align: center;
        align-items: center;
    }

    .ann-modal-right {
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 4rem 1rem 1rem;
    }

    .ann-modal-title {
        font-size: 2.2rem;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

.modal-visitor-count {
    position: absolute;
    bottom: 25px;
    left: 30px;
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 700;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.modal-content:hover .modal-visitor-count {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.5);
}

/* Legacy btn-login styles removed to allow unified styles to take effect */

/* Custom modifier for Hero buttons (Yayınlar) to override default .btn */
.btn-outline-white {
    background-color: transparent !important;
    border: 2px solid white !important;
    color: white !important;
    margin-left: 10px;
}


.btn-outline-white:hover {
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background-color: transparent !important;
}

/* Footer Visitor Info Positioning */
#visitor-info {
    position: absolute;
    right: 6rem;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    margin-top: 0 !important;
    /* inline stili ez */
    max-width: 300px;
}

#visitor-info span {
    display: block;
    /* Alt alta geçmesi istenirse, veya yan yana kalabilir */
}

/* Dersler Sayfası Modal Kapatma Butonu İyileştirmesi - Artık .modal-close içinde ortak css kullanılıyor */

/* Dersler sayfasında modal başlığını da görünür yapalım */
#videoModalOverlay .modal-header,
#imageModalOverlay .modal-header {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    position: static;
    padding: 15px 25px;
}

#videoModalOverlay .modal-header h2,
#imageModalOverlay .modal-header h2 {
    display: block;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 700;
}

#videoModalOverlay .modal-body,
#imageModalOverlay .modal-body {
    background: white;
}

/* Mobilde normal akışa dön */
@media (max-width: 768px) {
    #visitor-info {
        position: static;
        transform: none;
        text-align: center;
        margin-top: 1rem !important;
        margin-bottom: 0.5rem;
    }
}

/* Hero Giriş Animasyonları */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    opacity: 0;
    animation: slideDownFade 0.6s ease forwards;
}

/* Staggered Delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

.delay-7 {
    animation-delay: 0.7s;
}

.delay-8 {
    animation-delay: 0.8s;
}

/* Fancybox (Galeri ve Inline Modallar) Kapatma Butonu Özelleştirmesi - Sistemdeki diğer modallarla uyumlu */
.fancybox-button--close,
.fancybox-close-small {
    background: #ffffff !important;
    border: 2px solid #1e293b !important;
    color: #1e293b !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    margin: 15px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fancybox-button--close:hover,
.fancybox-close-small:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    transform: rotate(90deg) scale(1.1) !important;
}

.fancybox-close-small svg path {
    fill: currentColor !important;
}
/* Code Accordion Styles */
.code-details {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}
.code-summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-color);
    background-color: white;
    border-bottom: 1px solid #eee;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}
.code-summary::-webkit-details-marker {
    display: none;
}
.code-summary:hover {
    background-color: #f8f9fa;
}
.code-content-wrapper {
    padding: 0;
    background-color: #2d2d2d;
}
.code-content-wrapper pre {
    margin: 0 !important;
    border-radius: 0 0 8px 8px !important;
    max-height: 500px;
    overflow: auto;
}

/* Code Modal Two Column Layout */
.code-modal-container {
    display: flex;
    flex-direction: row;
    height: 80vh;
    min-height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.code-modal-sidebar {
    width: 320px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.code-tab-btn {
    padding: 1.2rem 1rem;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    transition: background 0.3s, color 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.code-tab-btn i {
    color: var(--accent-color);
}
.code-tab-btn:hover {
    background-color: #e9ecef;
}
.code-tab-btn.active {
    background-color: var(--accent-color);
    color: white;
}
.code-tab-btn.active i {
    color: white;
}
.code-modal-content {
    flex: 1;
    background-color: #2d2d2d;
    overflow-y: auto;
}
.code-pane {
    display: none;
    min-height: 100%;
}
.code-pane.active {
    display: block;
}
.code-pane pre {
    margin: 0 !important;
    border-radius: 0 !important;
    min-height: 100%;
}
@media (max-width: 768px) {
    .code-modal-container {
        flex-direction: column;
    }
    .code-modal-sidebar {
        width: 100%;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}

/* Copy Button and Text Selection Enable */
.code-pane {
    position: relative;
}
.copy-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    z-index: 10;
}
.copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}
.code-pane pre, .code-pane code {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Fancybox Fullscreen Caption Enhancements */
.fancybox-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 70%, transparent 100%) !important;
    padding: 60px 20px 20px 20px !important;
}

.fancybox-caption__body {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8) !important;
}

