/* Тихая гавань - Детективная онлайн-игра
 * Современный UI/UX дизайн
 * Версия 2.0
 */

/* ============================================
   CSS ПЕРЕМЕННЫЕ - ДИЗАЙН-СИСТЕМА
   ============================================ */
:root {
    /* Основные цвета */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #1e1b4b;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    
    /* Фоновые цвета */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    /* Текстовые цвета */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Статусные цвета */
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --info: #3b82f6;
    --info-light: #60a5fa;
    
    /* Границы и тени */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-glow-accent: 0 0 40px rgba(245, 158, 11, 0.3);
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-dark: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 26, 46, 0.9) 0%, rgba(15, 15, 26, 0.9) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    
    /* Типографика */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Размеры */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Анимации */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Фоновый паттерн */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Выделение текста */
::selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   ТИПОГРАФИКА
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

/* ============================================
   УТИЛИТАРНЫЕ КЛАССЫ
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.hidden { display: none !important; }

/* ============================================
   КНОПКИ
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-accent {
    background: var(--gradient-accent);
    color: #1a1a2e;
    box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 158, 11, 0.4);
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ============================================
   КАРТОЧКИ
   ============================================ */
.card {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.card-clickable {
    cursor: pointer;
    transition: all var(--transition-normal);
}

.card-clickable:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* ============================================
   ФОРМЫ
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 15px;
    transition: all var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px;
}

/* ============================================
   СТРАНИЦА ВХОДА
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('https://images.unsplash.com/photo-1453873531674-2151bcd01707?w=1920&q=80') center/cover no-repeat;
    filter: brightness(0.2) saturate(0.5);
    z-index: -2;
}

.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(15, 15, 26, 0.8) 0%, 
        rgba(15, 15, 26, 0.95) 50%,
        rgba(15, 15, 26, 1) 100%);
    z-index: -1;
}

.login-container {
    max-width: 480px;
    width: 100%;
}

.login-logo {
    text-align: center;
    margin-bottom: 48px;
}

.login-logo h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    text-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
}

.login-logo p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-form {
    background: var(--gradient-card);
    padding: 48px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(30px);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 12px;
}

.login-form .btn {
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    font-size: 16px;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger-light);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: none;
    font-size: 14px;
}

.login-error.show {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-error::before {
    content: '⚠️';
}

/* ============================================
   НАВИГАЦИЯ
   ============================================ */
.navbar {
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu {
    display: flex;
    gap: 8px;
    list-style: none;
}

.navbar-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    font-size: 14px;
    font-weight: 500;
}

.navbar-menu a:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.navbar-menu a.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.navbar-progress {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar {
    width: 140px;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    min-width: 40px;
}

/* ============================================
   СТРУКТУРА ПРИЛОЖЕНИЯ
   ============================================ */
.app-container {
    display: flex;
    min-height: calc(100vh - 73px);
}

/* Сайдбар */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    padding: 24px 0;
    flex-shrink: 0;
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
}

.sidebar-section {
    padding: 16px 24px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.sidebar-menu {
    list-style: none;
    padding: 0 12px;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: height var(--transition-normal);
}

.sidebar-menu a:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.sidebar-menu a:hover::before {
    height: 24px;
}

.sidebar-menu a.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-menu a.active::before {
    height: 24px;
}

.sidebar-menu .icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ============================================
   ДАШБОРД
   ============================================ */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.victim-profile {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 32px;
    align-items: start;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-detailed h3 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.bio {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

/* Сетка карточек дашборда */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.dashboard-grid .card {
    padding: 24px;
    text-align: center;
    cursor: pointer;
}

.dashboard-grid .card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.dashboard-grid h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.elapsed-time {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

/* ============================================
   ПОЧТОВЫЙ КЛИЕНТ
   ============================================ */
.email-client {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    height: calc(100vh - 140px);
}

.email-folders {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 6px;
}

.folder-item:hover {
    background: var(--bg-glass);
}

.folder-item.active {
    background: var(--gradient-primary);
    color: white;
}

.folder-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.folder-count {
    background: var(--danger);
    color: white;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.folder-item.active .folder-count {
    background: rgba(255, 255, 255, 0.3);
}

.email-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-list {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex: 1;
}

.email-list-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
}

.email-list-header h3 {
    font-size: 1.1rem;
}

.email-search {
    display: flex;
    gap: 12px;
}

.email-search input {
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    width: 220px;
    font-size: 14px;
}

.email-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.email-item {
    display: grid;
    grid-template-columns: 200px 1fr 130px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-normal);
    align-items: center;
}

.email-item:hover {
    background: var(--bg-glass);
}

.email-item.unread {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--primary);
}

.email-item.unread .email-sender,
.email-item.unread .email-subject {
    font-weight: 600;
    color: var(--text-primary);
}

.email-sender {
    color: var(--text-secondary);
    font-size: 14px;
}

.email-subject {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.email-date {
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}

.email-detail {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-color);
}

.email-detail-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.email-detail-subject {
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.email-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 13px;
}

.email-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.email-body {
    line-height: 1.9;
    color: var(--text-primary);
    font-size: 15px;
}

.email-body pre {
    white-space: pre-wrap;
    font-family: var(--font-primary);
    line-height: 1.9;
}

.evidence-marker {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   МЕССЕНДЖЕР
   ============================================ */
.messenger-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    height: calc(100vh - 140px);
}

.chat-list {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chat-list-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-glass);
}

.chat-list-header h3 {
    font-size: 1.1rem;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.chat-item:hover {
    background: var(--bg-glass);
}

.chat-item.active {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
}

.chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
}

.chat-preview {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-window {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-glass);
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.message.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-bubble {
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    line-height: 1.6;
    font-size: 14px;
}

.message.sent .message-bubble {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================
   СОЦИАЛЬНАЯ СЕТЬ
   ============================================ */
.social-profile {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}

.profile-card {
    text-align: center;
}

.profile-card .profile-avatar {
    margin: 0 auto 24px;
    width: 140px;
    height: 140px;
    font-size: 3.5rem;
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.profile-status {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.social-posts {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    border: 1px solid var(--border-color);
}

.post-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.post-author {
    font-weight: 600;
    font-size: 15px;
}

.post-date {
    font-size: 12px;
    color: var(--text-muted);
}

.post-content {
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-primary);
}

.post-actions {
    display: flex;
    gap: 24px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.post-action:hover {
    color: var(--primary-light);
}

/* ============================================
   БАНКОВСКОЕ ПРИЛОЖЕНИЕ
   ============================================ */
.bank-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

.account-summary {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 36px;
    color: white;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.account-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.account-balance {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
}

.account-label {
    opacity: 0.8;
    font-size: 14px;
    position: relative;
}

.transactions-list {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.transactions-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-normal);
}

.transaction-item:hover {
    background: var(--bg-glass);
}

.transaction-item.suspicious {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid var(--danger);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.transaction-details h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.transaction-details p {
    font-size: 12px;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 700;
    font-size: 15px;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

.bank-sidebar .card {
    margin-bottom: 20px;
}

/* ============================================
   РАБОЧИЙ ПОРТАЛ
   ============================================ */
.work-portal {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

.project-list {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.project-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-glass);
}

.project-item {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.project-item:hover {
    background: var(--bg-glass);
}

.project-item.suspicious {
    border-left: 3px solid var(--warning);
}

.project-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.project-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.task-list {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.task-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-glass);
}

.task-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox.completed {
    background: var(--success);
    border-color: var(--success);
}

.task-checkbox.completed::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.task-text {
    flex: 1;
    font-size: 14px;
}

.task-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-priority {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.high {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-light);
}

.task-priority.medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
}

.task-priority.low {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

/* ============================================
   ГАЛЕРЕЯ И ФАЙЛЫ
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.gallery-item {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--border-light);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    font-size: 3rem;
    opacity: 0.5;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    font-size: 12px;
}

.gallery-overlay div:first-child {
    font-weight: 600;
    margin-bottom: 4px;
}

/* ============================================
   КАРТЫ
   ============================================ */
.map-container {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.map-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-glass);
}

.map-placeholder {
    height: 350px;
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    background-image: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 26, 0.7);
}

.map-placeholder p {
    position: relative;
    color: var(--text-primary);
}

.location-list {
    padding: 24px;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.location-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.location-item.suspicious {
    border-left: 3px solid var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.location-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.location-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.location-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   ПОДСКАЗКИ
   ============================================ */
.hints-container {
    max-width: 800px;
    margin: 0 auto;
}

.hint-level {
    margin-bottom: 24px;
}

.hint-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.hint-level-header:hover {
    border-color: var(--primary);
}

.hint-level-title {
    font-weight: 600;
    font-size: 15px;
}

.hint-level-badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.hint-level-badge.easy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.hint-level-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
}

.hint-level-badge.hard {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-light);
}

.hint-list {
    background: var(--gradient-card);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 20px;
}

.hint-item {
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.hint-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.hint-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-item.revealed {
    border-left: 3px solid var(--accent);
    background: rgba(245, 158, 11, 0.05);
}

/* ============================================
   ФИНАЛЬНАЯ ФОРМА
   ============================================ */
.accusation-form {
    max-width: 850px;
    margin: 0 auto;
}

.accusation-section {
    margin-bottom: 32px;
}

.accusation-question {
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-light);
    font-size: 15px;
}

.evidence-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.evidence-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.evidence-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.evidence-item.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.evidence-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.evidence-item.selected .evidence-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.evidence-item.selected .evidence-checkbox::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

/* ============================================
   РЕЗУЛЬТАТЫ
   ============================================ */
.result-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.result-icon {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.3);
}

.result-icon.partial {
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.3);
}

.result-icon.fail {
    background: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.3);
}

.result-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.result-score {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.result-badge {
    display: inline-block;
    padding: 10px 24px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 32px;
}

.result-details {
    text-align: left;
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.result-item:last-child {
    border-bottom: none;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    background: var(--bg-secondary);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 28px;
    line-height: 1.8;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-glass);
}

/* ============================================
   УВЕДОМЛЕНИЯ
   ============================================ */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--gradient-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    z-index: 3000;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    animation: slideInRight 0.4s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 1.3rem;
}

.notification-text {
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(30px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.5s ease;
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1200px) {
    .bank-container,
    .work-portal,
    .social-profile {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        position: static;
        height: auto;
        padding: 16px 0;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 16px;
        gap: 8px;
    }
    
    .sidebar-menu li {
        margin-bottom: 0;
    }
    
    .sidebar-menu a {
        white-space: nowrap;
        padding: 12px 16px;
    }
    
    .sidebar-menu a::before {
        display: none;
    }
    
    .sidebar-section {
        display: none;
    }
    
    .email-client,
    .messenger-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .email-folders,
    .chat-list {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar-progress {
        width: 100%;
        justify-content: center;
    }
    
    .email-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .email-date {
        text-align: left;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .login-form {
        padding: 32px 24px;
    }
    
    .victim-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-avatar {
        margin: 0 auto;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .card {
        padding: 20px;
    }
    
    .login-logo h1 {
        font-size: 2.2rem;
    }
}

/* ============================================
   ПЕЧАТЬ
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar, .sidebar, .btn, .modal-overlay {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
