:root {
    --primary-color: #FDDB9E;
    --secondary-color: #945535;
    --accent-color: #E6B325;
    --text-color: #FDDB9E;
    --light-gray: #444444;
    --white: #FFFFFF;
    --background-color: #333333;
    --card-color: #3A3A3A;
    --border-color: #555555;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #2196F3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Экраны */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Экран приветствия */
.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-size: 36px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 800;
}

.name-tag {
    display: inline-block;
    color: var(--text-color);
    font-weight: 800;
    font-size: 28px;
    margin: 15px 0 5px;
}

h3 {
    font-size: 20px;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 30px;
}

.description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 40px;
    padding: 0 10px;
}

.login-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* Основной интерфейс */
.app-header {
    background: var(--card-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.logo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#pageTitle {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    gap: 10px;
}

.icon-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Контент */
.app-content {
    padding: 20px;
    padding-bottom: 80px;
    min-height: calc(100vh - 130px);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-color);
    opacity: 0.7;
}

/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-color);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 8px;
    border-top: 1px solid var(--border-color);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    max-width: 80px;
    border-radius: 12px;
    margin: 0 2px;
}

.nav-item:hover {
    opacity: 0.9;
    background: rgba(253, 219, 158, 0.1);
}

.nav-item.active {
    opacity: 1;
    color: var(--primary-color);
    background: rgba(253, 219, 158, 0.15);
    transform: translateY(-2px);
}

.nav-item:not(.active) .nav-icon {
    filter: brightness(0.8) saturate(0.8);
}

.nav-item.active .nav-icon {
    filter: brightness(1.2) saturate(1.2);
    transform: scale(1.1);
}

.nav-icon[fill="currentColor"] {
    fill: currentColor;
    opacity: 0.7;
}

.nav-item.active .nav-icon[fill="currentColor"] {
    opacity: 1;
    fill: var(--primary-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-text {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.2px;
    margin-top: 2px;
}

/* Карточки */
.card {
    background: var(--card-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.card-subtitle {
    color: var(--primary-color);
    font-size: 14px;
    opacity: 0.8;
}

/* Кнопки */
.btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--background-color);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

/* Период переключения */
.period-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.period-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.period-btn.active {
    background: var(--primary-color);
    color: var(--background-color);
}

/* Сумма */
.total-amount {
    text-align: center;
    margin: 30px 0;
}

.total-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.total-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.total-change {
    font-size: 14px;
    opacity: 0.8;
}

/* Список операций */
.operation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.operation-item:last-child {
    border-bottom: none;
}

.operation-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 15px;
}

.operation-info {
    flex: 1;
}

.operation-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.operation-details {
    font-size: 12px;
    opacity: 0.7;
    display: flex;
    gap: 10px;
}

.operation-amount {
    font-weight: 600;
    font-size: 16px;
}

.amount-income {
    color: var(--success-color);
}

.amount-expense {
    color: var(--danger-color);
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-color);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.type-selector {
    display: flex;
    gap: 10px;
}

.type-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.type-btn.active {
    background: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* В разработке */
.development {
    text-align: center;
    padding: 60px 20px;
}

.development-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.development-text {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 18px;
}

/* Настройки */
.settings-list {
    list-style: none;
}

.settings-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item label {
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Подписка */
.subscription-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.subscription-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.subscription-price {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
}

.subscription-features {
    text-align: left;
    margin: 20px 0;
}

.subscription-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscribe-btn {
    width: 100%;
    padding: 16px;
    background: var(--background-color);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* Новости */
.news-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.news-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 18px;
}

.news-excerpt {
    opacity: 0.9;
    line-height: 1.5;
}

/* Анимация для активной вкладки */
@keyframes gentlePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.nav-item.active .nav-icon {
    animation: gentlePulse 2s ease-in-out infinite;
}

/* Адаптивность */
@media (max-width: 360px) {
    .container {
        padding: 30px 15px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .name-tag {
        font-size: 24px;
    }
    
    .app-header {
        padding: 12px 15px;
    }
    
    .app-content {
        padding: 15px;
        padding-bottom: 80px;
    }
    
    .nav-text {
        font-size: 9px;
    }

    .nav-icon {
        width: 22px;
        height: 22px;
    }  
     
    .total-value {
        font-size: 40px;
    }
}