/* ==========================================================================
   EGT System Tema - Ultra Premium Katmanı
   Tema stillerinin üzerine eklenen premium görsel iyileştirmeler.
   ========================================================================== */

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--egt-border-color);
    border-radius: 3px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--egt-text-lighter);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--egt-border-color) transparent;
}

/* Sidebar scrollbar - inline with sidebar */
.egt-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
}

.egt-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.egt-sidebar-nav {
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* ==========================================================================
   Selection
   ========================================================================== */
::selection {
    background: var(--egt-primary-color);
    color: #fff;
}

::-moz-selection {
    background: var(--egt-primary-color);
    color: #fff;
}

/* ==========================================================================
   Focus Ring (Glow)
   ========================================================================== */
a:focus-visible,
button:focus-visible,
.egt-btn:focus-visible,
.egt-sidebar-toggle:focus-visible,
.egt-header-btn:focus-visible,
.egt-user-dropdown-toggle:focus-visible,
.egt-user-dropdown-item:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25), 0 0 0 1px var(--egt-primary-color) !important;
    border-radius: var(--egt-radius);
}

.egt-sidebar-nav a:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.4), 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */
@keyframes egtSkeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.egt-skeleton {
    background: linear-gradient(90deg, var(--egt-bg-secondary) 25%, var(--egt-border-color) 37%, var(--egt-bg-secondary) 63%);
    background-size: 200px 100%;
    animation: egtSkeleton 1.4s ease infinite;
    border-radius: var(--egt-radius-sm);
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.egt-skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 100%;
}

.egt-skeleton-text:last-child {
    width: 60%;
}

.egt-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.egt-skeleton-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--egt-radius);
}

.egt-skeleton-card {
    height: 120px;
    border-radius: var(--egt-radius-lg);
}

/* ==========================================================================
   Glass Morphism
   ========================================================================== */
.egt-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.egt-dark-mode .egt-glass {
    background: rgba(31, 41, 55, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
}

.egt-glass-sm {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.egt-dark-mode .egt-glass-sm {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Gradient Text
   ========================================================================== */
.egt-text-gradient {
    background: linear-gradient(135deg, var(--egt-primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Card Premium Hover
   ========================================================================== */
.egt-card,
.egt-stat-card,
.egt-article,
.egt-dashboard-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
}

.egt-card:hover,
.egt-article:hover {
    transform: translateY(-2px);
    box-shadow: var(--egt-shadow-lg);
    border-color: rgba(37, 99, 235, 0.15);
}

.egt-stat-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--egt-shadow-lg);
    border-color: rgba(37, 99, 235, 0.1);
}

.egt-dashboard-card:hover {
    box-shadow: var(--egt-shadow-lg);
    border-color: rgba(37, 99, 235, 0.1);
}

/* Sidebar nav item premium */
.egt-sidebar-nav a {
    position: relative;
    overflow: hidden;
}

.egt-sidebar-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.egt-sidebar-nav a:hover::before {
    opacity: 1;
}

.egt-sidebar-nav a.active::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.05));
}

/* ==========================================================================
   Dashboard Welcome Banner Animated
   ========================================================================== */
.egt-welcome-banner {
    position: relative;
    overflow: hidden;
}

.egt-welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.egt-welcome-banner::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.egt-welcome-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.egt-welcome-banner:hover .egt-welcome-icon {
    transform: scale(1.1) rotate(-5deg);
    opacity: 0.5;
}

/* ==========================================================================
   Stat Cards Premium
   ========================================================================== */
.egt-stat-card {
    position: relative;
    overflow: hidden;
}

.egt-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.3s ease;
}

.egt-stat-card:hover::after {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 70%);
}

.egt-stat-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.egt-stat-card:hover .egt-stat-icon {
    transform: scale(1.1) rotate(3deg);
}

/* ==========================================================================
   Quick Link Premium
   ========================================================================== */
.egt-quick-link {
    position: relative;
    overflow: hidden;
}

.egt-quick-link i {
    transition: transform 0.25s ease, color 0.25s ease;
}

.egt-quick-link:hover i {
    transform: translateX(3px) scale(1.1);
}

.egt-quick-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--egt-primary-color);
    transition: width 0.25s ease;
    border-radius: 2px;
}

.egt-quick-link:hover::after {
    width: 100%;
}

/* ==========================================================================
   Dashboard List Premium
   ========================================================================== */
.egt-dashboard-list li a {
    position: relative;
    padding-left: 20px;
    transition: all 0.2s ease;
}

.egt-dashboard-list li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--egt-primary-color);
    border-radius: 3px;
    transition: height 0.25s ease;
}

.egt-dashboard-list li a:hover::before {
    height: 60%;
}

.egt-dashboard-list li a:hover {
    padding-left: 24px;
}

/* ==========================================================================
   Button Premium
   ========================================================================== */
.egt-btn {
    position: relative;
    overflow: hidden;
}

.egt-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.egt-btn:hover::after {
    opacity: 1;
}

.egt-btn:active {
    transform: scale(0.97);
}

.egt-btn-primary {
    background: linear-gradient(135deg, var(--egt-primary-color), var(--egt-primary-hover));
    border: none;
}

.egt-btn-primary:hover {
    background: linear-gradient(135deg, var(--egt-primary-hover), #1e40af);
}

/* ==========================================================================
   Badge Premium
   ========================================================================== */
.egt-badge {
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
}

.egt-badge-primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.06));
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.egt-badge-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.06));
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.egt-badge-warning {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(234, 179, 8, 0.06));
    border: 1px solid rgba(234, 179, 8, 0.15);
}

.egt-badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   Avatar Premium
   ========================================================================== */
.egt-user-avatar,
.egt-header-avatar {
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.egt-user-info:hover .egt-user-avatar,
.egt-user-dropdown-toggle:hover .egt-header-avatar {
    border-color: var(--egt-primary-color);
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.egt-user-avatar-placeholder,
.egt-header-avatar-placeholder {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.egt-user-info:hover .egt-user-avatar-placeholder,
.egt-user-dropdown-toggle:hover .egt-header-avatar-placeholder {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   Notification Badge Pulse
   ========================================================================== */
@keyframes egtPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.egt-notification-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: egtPulse 2s infinite;
}

/* ==========================================================================
   Login Page Premium
   ========================================================================== */
@keyframes egtFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes egtDrift {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(30px) translateY(-15px); }
    100% { transform: translateX(0) translateY(0); }
}

.egt-login-wrapper {
    position: relative;
    overflow: hidden;
}

.egt-login-wrapper::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: egtDrift 8s ease-in-out infinite;
    pointer-events: none;
}

.egt-login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: egtDrift 12s ease-in-out infinite reverse;
    pointer-events: none;
}

.egt-login-card {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.egt-login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

body.egt-dark-mode .egt-login-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.egt-login-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.egt-login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.egt-login-btn:hover::after {
    opacity: 1;
}

.egt-login-btn:active {
    transform: scale(0.97);
}

.egt-login-header h2 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.egt-login-form .form-control {
    transition: all 0.25s ease;
}

.egt-login-form .form-control:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1), 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   User Dropdown Premium
   ========================================================================== */
.egt-user-dropdown {
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: visible;
}

body.egt-dark-mode .egt-user-dropdown {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.egt-user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: var(--egt-bg-color);
    border-left: 1px solid var(--egt-border-color);
    border-top: 1px solid var(--egt-border-color);
    transform: rotate(45deg);
    z-index: -1;
}

body.egt-dark-mode .egt-user-dropdown::before {
    background: #1f2937;
    border-color: #374151;
}

.egt-user-dropdown-item {
    transition: all 0.15s ease;
}

.egt-user-dropdown-item:hover {
    padding-left: 1.5rem;
}

/* ==========================================================================
   Header Premium
   ========================================================================== */
.egt-header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
}

body.egt-dark-mode .egt-header {
    background: rgba(31, 41, 55, 0.85);
}

.egt-header-search {
    transition: all 0.25s ease;
}

.egt-header-search:focus-within {
    width: 280px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

/* ==========================================================================
   Footer Premium
   ========================================================================== */
.egt-footer {
    position: relative;
}

.egt-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--egt-border-color), transparent);
}

/* ==========================================================================
   Sidebar Toggle Premium
   ========================================================================== */
.egt-sidebar-toggle {
    transition: all 0.25s ease;
}

.egt-sidebar-toggle:hover {
    transform: rotate(90deg);
}

/* ==========================================================================
   Theme Toggle Premium
   ========================================================================== */
.egt-theme-toggle {
    transition: all 0.3s ease;
}

.egt-theme-toggle:hover {
    transform: rotate(30deg);
}

/* ==========================================================================
   Breadcrumb Premium
   ========================================================================== */
.egt-breadcrumbs {
    padding: 0.5rem 0;
}

.breadcrumb-list li {
    position: relative;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--egt-text-lighter);
    font-size: 0.75rem;
}

.breadcrumb-list .separator {
    display: none;
}

/* ==========================================================================
   Comment Premium
   ========================================================================== */
.egt-comment-item {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--egt-radius-lg);
    background: var(--egt-bg-color);
    border: 1px solid var(--egt-border-color);
    transition: all 0.2s ease;
}

.egt-comment-item:hover {
    border-color: rgba(37, 99, 235, 0.1);
    box-shadow: var(--egt-shadow-md);
}

/* ==========================================================================
   Search Results Premium
   ========================================================================== */
.egt-search-item {
    transition: all 0.2s ease;
}

.egt-search-item:hover {
    background: var(--egt-bg-secondary);
    padding-left: 20px;
}

/* ==========================================================================
   Responsive Touch-ups
   ========================================================================== */
@media (max-width: 768px) {
    .egt-header {
        backdrop-filter: none;
    }

    .egt-card:hover,
    .egt-article:hover,
    .egt-stat-card:hover {
        transform: none;
    }

    .egt-login-wrapper::before,
    .egt-login-wrapper::after {
        display: none;
    }
}

/* ==========================================================================
   Dark Mode Overrides for Premium
   ========================================================================== */
body.egt-dark-mode::selection {
    background: var(--egt-primary-color);
    color: #fff;
}

body.egt-dark-mode ::selection {
    background: var(--egt-primary-color);
    color: #fff;
}

body.egt-dark-mode .egt-user-dropdown-toggle:hover .egt-header-avatar {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}
