/* ===== HAYAT DENEYİMİ - MODERN THEME VARIABLES ===== */
:root {
    /* Renk Paleti - X benzeri ama daha yumuşak, hayat temasına uygun */
    --color-bg-primary: #0f0f0f;
    --color-bg-secondary: #1a1a1a;
    --color-bg-tertiary: #252525;
    --color-text-primary: #f7f7f7;
    --color-text-secondary: #a1a1a1;
    --color-accent: #1d9bf0;        /* Ana vurgu - güven veren mavi */
    --color-accent-hover: #1a8cd8;
    --color-success: #00ba7c;        /* Onay, olumlu */
    --color-warning: #ffd400;        /* Uyarı */
    --color-danger: #f91880;         /* Hata, rapor */
    --color-border: #333333;
    
    /* Hayat teması için ek renkler */
    --color-life: #10b981;           /* Yaşam, büyüme */
    --color-experience: #8b5cf6;     /* Deneyim, bilgelik */
    
    /* Modern UI */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(29,155,240,0.3);
    
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Font */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== DARK MODE DEFAULT (Modern) ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLLBAR CUSTOMIZATION ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ===== GLASSMORPHISM CARD ===== */
.glass-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.glass-card:active {
    transform: translateY(0);
}

/* ===== X-STYLE FEED ANIMATION ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-item {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.feed-item:nth-child(1) { animation-delay: 0.05s; }
.feed-item:nth-child(2) { animation-delay: 0.1s; }
.feed-item:nth-child(3) { animation-delay: 0.15s; }
.feed-item:nth-child(4) { animation-delay: 0.2s; }
.feed-item:nth-child(5) { animation-delay: 0.25s; }
.feed-item:nth-child(n+6) { animation-delay: 0.3s; }

/* ===== LIVE INDICATOR PULSE ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
    margin-right: 6px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--color-success);
    font-weight: 500;
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--color-border);
    z-index: 1000;
    display: none;
    padding: env(safe-area-inset-bottom) 0 0;
}

@media (max-width: 768px) {
    .mobile-nav { display: flex; }
    .desktop-sidebar { display: none !important; }
    .main-feed { 
        border-right: 1px solid var(--color-border) !important;
        border-left: none !important;
    }
    /* Bottom nav safe area for iPhone */
    .mobile-nav { padding-bottom: env(safe-area-inset-bottom); }
}

/* ===== INFINITE SCROLL LOADING ===== */
.scroll-loader {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.scroll-loader .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TRUST SCORE BADGE ===== */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.trust-badge.high { 
    color: var(--color-success); 
    background: rgba(0, 186, 124, 0.1);
}
.trust-badge.medium { 
    color: var(--color-warning); 
    background: rgba(255, 212, 0, 0.1);
}
.trust-badge.low { 
    color: var(--color-danger); 
    background: rgba(249, 24, 128, 0.1);
}

/* ===== CATEGORY PILL ===== */
.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

.category-pill:hover,
.category-pill.active {
    background: var(--color-accent);
    color: white;
}

/* ===== AI ANSWER BOX ===== */
.ai-answer-box {
    border-left: 4px solid var(--color-accent);
    background: linear-gradient(135deg, rgba(29,155,240,0.1), rgba(26,26,26,0.8));
    padding: 16px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 12px 0;
}

.ai-answer-box .ai-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover {
    background: var(--color-border);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}
.btn-ghost:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-tertiary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== INPUT STYLES ===== */
.input {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.2);
}

.input::placeholder {
    color: var(--color-text-secondary);
}

/* ===== TAG STYLES ===== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.tag:hover {
    background: var(--color-accent);
    color: white;
}

.tag-primary {
    background: rgba(29, 155, 240, 0.2);
    color: var(--color-accent);
}

/* ===== AVATAR STYLES ===== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-border);
    transition: var(--transition-fast);
}

.avatar:hover {
    border-color: var(--color-accent);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

.avatar-online::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: var(--color-success);
    border-radius: 50%;
    border: 2px solid var(--color-bg-primary);
}

/* ===== SKELETON LOADER ===== */
.skeleton {
    background: linear-gradient(90deg, var(--color-bg-secondary) 25%, var(--color-bg-tertiary) 50%, var(--color-bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-text { height: 16px; margin: 8px 0; }
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 100%; }

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    max-width: 360px;
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.warning { border-left: 4px solid var(--color-warning); }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== DROPDOWN STYLES ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--color-text-primary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--color-bg-tertiary);
}

.dropdown-item.danger {
    color: var(--color-danger);
}

/* ===== UTILITY CLASSES ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 1024px) {
    .hidden-lg { display: none !important; }
}

@media (max-width: 768px) {
    .hidden-md { display: none !important; }
}

@media (max-width: 480px) {
    .hidden-sm { display: none !important; }
}

/* ===== PRINT STYLES ===== */
@media print {
    .mobile-nav,
    .desktop-sidebar,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass-card {
        background: white;
        border: 1px solid #ccc;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --color-border: #666;
        --color-text-secondary: #ccc;
    }
    
    .glass-card {
        border-width: 2px;
    }
}