* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #dc2626;
    --dark-red: #991b1b;
    --light-red: #fecaca;
    --black: #000000;
    --dark-gray: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --gold: #fbbf24;
    --shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}

/* --- Общее оформление --- */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Анимации --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes coinFlip {
    0% { transform: rotateY(0) scale(0.5); opacity: 0; }
    50% { transform: rotateY(180deg) scale(1.2); opacity: 1; }
    100% { transform: rotateY(360deg) scale(1); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- Экран загрузки --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--black) 0%, var(--primary-red) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.bank-logo {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bank-logo i {
    font-size: 3em;
    color: var(--gold);
    animation: pulse 2s infinite;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* --- Анимация перевода --- */
.transfer-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.animation-content {
    text-align: center;
    animation: bounceIn 0.8s ease-out;
}

.coin-flip {
    font-size: 5em;
    color: var(--gold);
    margin-bottom: 20px;
    animation: coinFlip 1.5s ease-out;
}

.coin-flip i {
    filter: drop-shadow(0 0 20px var(--gold));
}

.success-text {
    color: var(--white);
}

.success-text i {
    font-size: 3em;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.success-text h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.success-text p {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--gold);
}

/* --- Основной экран --- */
.main-screen {
    animation: slideIn 0.6s ease-out;
}

/* --- Шапка --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--primary-red);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    box-shadow: var(--shadow);
}

.user-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--white);
}

.notifications {
    position: relative;
}

.notifications-btn {
    background: var(--primary-red);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--white);
    position: relative;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px 0 rgba(220,38,38,0.18);
}
.notifications-btn:hover {
    background: var(--dark-red);
    transform: scale(1.1);
    box-shadow: 0 0 16px 2px rgba(220,38,38,0.22);
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: var(--black);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Выпадающее меню уведомлений --- */
.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--dark-gray);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-top: 10px;
    animation: fadeIn 0.3s ease-out;
    z-index: 200;
    border: 1px solid var(--primary-red);
}
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray);
    font-weight: 600;
    background: var(--black);
    border-radius: 16px 16px 0 0;
}
.close-dropdown {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray);
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}
.close-dropdown:hover {
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
}
.notifications-list {
    padding: 30px;
    text-align: center;
    color: var(--gray);
    font-style: italic;
}

/* --- Основной контент --- */
.main-content {
    padding: 20px;
    padding-bottom: 100px;
}

/* --- Промо блок --- */
.promo-section {
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}
.promo-card {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 20px;
    position: relative;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.07), 0 0 0 0 transparent;
    transition: box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}
.promo-card:hover {
    box-shadow: 0 8px 25px 0 rgba(220,38,38,0.15), 0 0 25px 2px rgba(220,38,38,0.2);
    border-color: var(--primary-red);
}
.promo-icon {
    font-size: 2em;
    color: var(--gold);
    text-shadow: 0 0 7px rgba(220,38,38,0.13), 0 0 2px var(--primary-red);
}
.promo-text h3 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
}
.promo-text p {
    font-size: 14px;
    opacity: 0.9;
}
.promo-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.3s;
    color: var(--white);
}
.promo-close:hover {
    opacity: 1;
    color: var(--gold);
}

/* --- Баланс Wild Coin --- */
.balance-section {
    margin-bottom: 15px;
    animation: fadeIn 0.6s ease-out 0.4s both;
}
.balance-card {
    background: var(--dark-gray);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid var(--primary-red);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.07), 0 0 0 0 transparent;
    transition: box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}
.balance-card:hover {
    box-shadow: 0 8px 25px 0 rgba(220,38,38,0.15), 0 0 25px 2px rgba(220,38,38,0.20);
    border-color: var(--primary-red);
}
.balance-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.balance-header i {
    font-size: 1.5em;
    color: var(--gold);
    text-shadow: 0 0 7px rgba(220,38,38,0.13), 0 0 2px var(--primary-red);
}
.balance-header h2 {
    font-size: 18px;
    color: var(--gray);
    font-weight: 500;
}
.balance-amount {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
    animation: subtlePulse 2.2s infinite;
}
@keyframes subtlePulse {
    0%,100% { text-shadow: 0 2px 10px rgba(220,38,38,0.18); }
    50% { text-shadow: 0 2px 20px rgba(220,38,38,0.24); }
}
.account-number {
    font-size: 14px;
    color: var(--gray);
}
.balance-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.action-btn.primary {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 0 8px 0 rgba(220, 38, 38, 0.13); 
    border: 1.5px solid transparent;
}
.action-btn.primary:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4), 0 0 16px 2px rgba(220,38,38,0.22);
    border-color: var(--primary-red);
}
.action-btn.outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}
.action-btn.outline:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 0 16px 2px rgba(220,38,38,0.1);
}
.action-btn.qr-btn {
    background: var(--black);
    color: var(--primary-red);
    font-size: 18px;
    width: 50px;
    height: 50px;
    box-shadow: 0 0 8px 0 rgba(220, 38, 38, 0.13); 
    border: 1.5px solid transparent;
}
.action-btn.qr-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 0 16px 2px rgba(220,38,38,0.22);
    border-color: var(--primary-red);
}

/* --- Перевод и Вклад --- */
.transfer-section, .deposit-section {
    margin-bottom: 15px;
    animation: fadeIn 0.6s ease-out 0.6s both;
}
.transfer-card, .deposit-card {
    background: var(--dark-gray);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.07), 0 0 0 0 transparent;
}
.transfer-card:hover, .deposit-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(220,38,38,0.15), 0 0 25px 2px rgba(220,38,38,0.20);
}
.transfer-info, .deposit-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.transfer-icon, .deposit-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: var(--white);
    text-shadow: 0 0 7px rgba(220,38,38,0.13), 0 0 2px var(--primary-red);
}
.transfer-text h3, .deposit-text h3 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
}
.transfer-text p, .deposit-text p {
    font-size: 14px;
    color: var(--gray);
}

/* --- Нижнее меню --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--black);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    box-shadow: 0 -4px 28px rgba(220,38,38,0.25);
    border-top: 1px solid var(--primary-red);
    backdrop-filter: blur(20px);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 12px;
    flex: 1;
    max-width: 80px;
}
.nav-item:hover, .nav-item.active {
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.13);
    box-shadow: 0 0 16px 2px rgba(220,38,38,0.13), 0 0 4px 2px var(--primary-red);
}
.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
    text-shadow: 0 0 7px rgba(220,38,38,0.13), 0 0 2px var(--primary-red);
}
.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

/* --- Модальные окна --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}
.modal-content {
    background: var(--dark-gray);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    animation: bounceIn 0.4s ease-out 0.1s both;
    border: 1px solid var(--primary-red);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray);
    background: var(--black);
    border-radius: 20px 20px 0 0;
}
.modal-header h3 {
    font-weight: 600;
    color: var(--white);
}
.close-modal {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray);
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}
.close-modal:hover {
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
}
.modal-body {
    padding: 30px;
    text-align: center;
    color: var(--gray);
}

/* --- FadeOut анимация для промо --- */
@keyframes fadeOut {
    from { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
    to { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.9); 
    }
}

/* --- Адаптивность --- */
@media (max-width: 480px) {
    .main-content {
        padding: 15px;
        padding-bottom: 90px;
    }
    .balance-card {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }
    .balance-actions {
        flex-direction: row;
        width: 100%;
    }
    .action-btn {
        flex: 1;
    }
    .notifications-dropdown {
        width: 280px;
        right: -10px;
    }
    .balance-amount {
        font-size: 2em;
    }
}