:root {
    --primary-color: #0d6efd; /* Bootstrap Primary Blue (was Indigo #4f46e5) */
    --primary-hover: #0b5ed7; /* Darker Blue (was #4338ca) */
    --bg-color: #f8f9fa; /* Light Gray/White (was #f3f4f6) */
    --card-bg: #ffffff;
    --text-main: #212529; /* Dark Gray (was #111827) */
    --text-muted: #6c757d; /* Muted Gray (was #6b7280) */
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6; /* Улучшает читаемость текста */
    -webkit-font-smoothing: antialiased;
}

/* Navbar customization */
.navbar {
    background-color: var(--primary-color) !important;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 400;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.9;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-w-100-mobile {
    width: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

/* Custom elements */
.balance-card {
    background: linear-gradient(135deg, var(--primary-color), #6ea8fe); /* Updated gradient to match blue theme */
    color: white;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 10px 0;
}

/* Chat bubbles */
.chat-container {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
}

.chat-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    word-wrap: break-word; /* Перенос длинных слов */
    word-break: break-word;
}

.chat-bubble.me {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble.other {
    background-color: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* Mobile adaptations */
@media (max-width: 768px) {
    .btn-w-100-mobile {
        width: 100%;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .container-lg {
        padding-left: 15px;
        padding-right: 15px;
    }

    .navbar-collapse {
        background: rgba(0,0,0,0.05);
        margin: 0 -15px;
        padding: 15px;
    }
    
    .user-info-block {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .balance-amount {
        font-size: 2rem;
    }
}
