/* ============================================
   HostPanel - Modern UI Styles
   Animasyonlar, Karanlık Tema, Geçişler
   ============================================ */

/* ============================================
   CSS Variables - Tema Renkleri
   ============================================ */
:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Accent Colors */
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --gradient-info: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

/* Dark Theme */
.dark {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Dark mode body */
.dark body,
body.dark-mode {
    background-color: #111827;
    color: #f9fafb;
}

/* ============================================
   Animations - Keyframes
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    }
}

/* ============================================
   Animation Classes
   ============================================ */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.4s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Staggered animations */
.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* ============================================
   Cards & Containers
   ============================================ */
.card {
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: 0 1px 3px var(--shadow-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--shadow-color);
}

.card-hover-lift:hover {
    transform: translateY(-5px);
}

.card-hover-glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
}

.btn-gradient:hover {
    opacity: 0.9;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

/* Button with icon animation */
.btn-icon-animate i {
    transition: transform 0.2s ease;
}

.btn-icon-animate:hover i {
    transform: translateX(3px);
}

/* ============================================
   Form Elements
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .form-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .form-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dark .form-label {
    color: #d1d5db;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

.dark .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.dark .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.dark .badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.dark .badge-info {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    animation: fadeInDown 0.3s ease-out;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-error, .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.dark .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.dark .alert-error, .dark .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.dark .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.dark .alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dark .sidebar {
    background: #1f2937;
    border-color: #374151;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin: 0.125rem 0;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-link.active {
    background: var(--accent-primary);
    color: white;
}

.sidebar-link i {
    width: 1.5rem;
    margin-right: 0.75rem;
    text-align: center;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover td {
    background: var(--bg-secondary);
}

.dark th {
    background: #374151;
}

.dark td {
    border-color: #374151;
}

.dark tr:hover td {
    background: #1f2937;
}

/* ============================================
   Modal
   ============================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.3s ease-out;
}

.dark .modal-content {
    background: #1f2937;
}

/* ============================================
   Tooltips
   ============================================ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 0.5rem 0.75rem;
    background: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress {
    height: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ============================================
   Stats Cards
   ============================================ */
.stat-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--shadow-color);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
    position: relative;
    width: 3.5rem;
    height: 2rem;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle.dark::after {
    transform: translateX(1.5rem);
    background: #1f2937;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    transition: opacity 0.3s ease;
}

.theme-toggle .icon-sun {
    left: 0.5rem;
    color: #fbbf24;
}

.theme-toggle .icon-moon {
    right: 0.5rem;
    color: #60a5fa;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 40;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .ml-64 {
        margin-left: 0 !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar,
    .no-print {
        display: none !important;
    }
    
    .ml-64 {
        margin-left: 0 !important;
    }
}
