/* =====================================
   ГЛОБАЛЬНЫЕ СТИЛИ
   ===================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Анимированный фон */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(88, 44, 131, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(88, 44, 131, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 15s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* =====================================
   КОНТЕЙНЕР
   ===================================== */

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    gap: 70px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   СЕКЦИЯ ЗАГОЛОВКА (АВАТАР И НИК)
   ===================================== */

.header-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

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

/* Обёртка аватара */
.avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(88, 44, 131, 0.3), rgba(44, 88, 131, 0.3));
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(88, 44, 131, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: glowPulse 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(88, 44, 131, 0.5),
                inset 0 0 20px rgba(255, 255, 255, 0.15);
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(88, 44, 131, 0.3),
                    inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 8px 40px rgba(88, 44, 131, 0.5),
                    inset 0 0 25px rgba(255, 255, 255, 0.15);
    }
}

/* Аватар */
.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Ник с радужным переливанием */
.nickname {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(
        90deg,
        #ff0000 0%,
        #ff7f00 16.66%,
        #ffff00 33.33%,
        #00ff00 50%,
        #0000ff 66.66%,
        #4b0082 83.33%,
        #ff0000 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 6s linear infinite;
    cursor: pointer;
    transition: filter 0.3s ease;
    letter-spacing: 2px;
    margin: 10px 0;
}

.nickname:hover {
    filter: drop-shadow(0 0 15px rgba(255, 100, 0, 0.7));
}

@keyframes rainbowShift {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Описание */
.description {
    font-size: 1.05rem;
    color: rgba(224, 224, 224, 0.75);
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.8;
    opacity: 0.9;
}

/* =====================================
   СЕКЦИЯ БАНКОВ
   ===================================== */

.banks-section {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.banks-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Кнопка банка */
.bank-button {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 28px;
    border: none;
    border-radius: 35px;
    background: linear-gradient(135deg, rgba(88, 44, 131, 0.25) 0%, rgba(44, 88, 131, 0.25) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    font-size: 1.15rem;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(88, 44, 131, 0.2);
    position: relative;
    overflow: hidden;
}

.bank-button::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;
}

.bank-button:hover::before {
    left: 100%;
}

.bank-button:hover {
    background: linear-gradient(135deg, rgba(88, 44, 131, 0.4) 0%, rgba(44, 88, 131, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(88, 44, 131, 0.4);
}

.bank-button:active {
    transform: translateY(-2px);
}

/* Иконка банка */
.bank-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}

.bank-button:hover .bank-icon {
    transform: scale(1.15) rotate(5deg);
}

/* Название банка */
.bank-name {
    flex-grow: 1;
    text-align: left;
}

/* Индикатор (стрелка) */
.bank-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.bank-button:hover .bank-arrow {
    transform: translateX(5px);
}

.bank-arrow::after {
    content: '→';
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.7);
}

/* =====================================
   МОДАЛЬНОЕ ОКНО - ОСНОВНОЕ
   ===================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Содержимое модаля */
.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border-radius: 30px;
    padding: 45px 35px;
    max-width: 520px;
    width: 100%;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Прокрутка в модале */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(88, 44, 131, 0.5);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 44, 131, 0.7);
}

/* Кнопка закрытия (X) */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-close span {
    position: absolute;
    width: 22px;
    height: 2.5px;
    background: #e0e0e0;
    border-radius: 2px;
}

.modal-close span:first-child {
    transform: rotate(45deg);
}

.modal-close span:last-child {
    transform: rotate(-45deg);
}

/* Тело модаля */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 35px;
    margin-bottom: 30px;
}

/* QR секция */
.qr-section {
    display: flex;
    justify-content: center;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.qr-code {
    width: 280px;
    height: 280px;
    border-radius: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(88, 44, 131, 0.3);
    object-fit: contain;
    animation: zoomIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(88, 44, 131, 0.5);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Заголовок модаля */
.modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #e0e0e0, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 0.6s ease-out 0.2s both;
    letter-spacing: 0.5px;
}

/* Реквизиты */
.requisites {
    background: rgba(88, 44, 131, 0.15);
    border-left: 5px solid rgba(88, 44, 131, 0.8);
    padding: 24px;
    border-radius: 15px;
    font-size: 1rem;
    line-height: 2;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(224, 224, 224, 0.95);
    animation: fadeIn 0.6s ease-out 0.3s both;
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.requisites::-webkit-scrollbar {
    width: 6px;
}

.requisites::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.requisites::-webkit-scrollbar-thumb {
    background: rgba(88, 44, 131, 0.4);
    border-radius: 10px;
}

/* Кнопка закрытия */
.modal-button-close {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(88, 44, 131, 0.5) 0%, rgba(44, 88, 131, 0.5) 100%);
    color: #e0e0e0;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.6s ease-out 0.4s both;
    letter-spacing: 0.5px;
}

.modal-button-close:hover {
    background: linear-gradient(135deg, rgba(88, 44, 131, 0.7) 0%, rgba(44, 88, 131, 0.7) 100%);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(88, 44, 131, 0.3);
}

.modal-button-close:active {
    transform: translateY(0);
}

/* =====================================
   МОДАЛЬНОЕ ОКНО - ПОЛНОЭКРАННЫЙ QR
   ===================================== */

.qr-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.qr-fullscreen-overlay.active {
    display: flex;
    opacity: 1;
}

/* Контейнер полноэкранного QR */
.qr-fullscreen-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qr-fullscreen-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
    object-fit: contain;
}

/* Кнопка закрытия полноэкранного QR */
.qr-fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.qr-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.qr-fullscreen-close span {
    position: absolute;
    width: 26px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
}

.qr-fullscreen-close span:first-child {
    transform: rotate(45deg);
}

.qr-fullscreen-close span:last-child {
    transform: rotate(-45deg);
}

/* =====================================
   АДАПТИВНОСТЬ
   ===================================== */

@media (max-width: 768px) {
    .container {
        padding: 40px 15px;
        gap: 50px;
    }

    .nickname {
        font-size: 2.2rem;
        letter-spacing: 1.5px;
    }

    .description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .avatar-wrapper {
        width: 130px;
        height: 130px;
    }

    .bank-button {
        padding: 18px 22px;
        font-size: 1.05rem;
        gap: 14px;
    }

    .bank-icon {
        width: 46px;
        height: 46px;
    }

    .modal-content {
        padding: 35px 25px;
        border-radius: 25px;
        max-width: 450px;
    }

    .qr-code {
        width: 240px;
        height: 240px;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .requisites {
        font-size: 0.95rem;
        padding: 20px;
        line-height: 1.8;
    }

    .qr-fullscreen-close {
        width: 45px;
        height: 45px;
        top: 20px;
        right: 20px;
    }

    .qr-fullscreen-image {
        max-width: 85vw;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px 12px;
        gap: 35px;
    }

    .nickname {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .avatar-wrapper {
        width: 110px;
        height: 110px;
    }

    .banks-container {
        gap: 14px;
    }

    .bank-button {
        padding: 15px 18px;
        font-size: 1rem;
        gap: 12px;
    }

    .bank-icon {
        width: 40px;
        height: 40px;
    }

    .modal-content {
        padding: 28px 18px;
        border-radius: 20px;
        max-width: 100%;
    }

    .modal-close {
        width: 40px;
        height: 40px;
    }

    .qr-code {
        width: 200px;
        height: 200px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .requisites {
        font-size: 0.9rem;
        padding: 16px;
        border-left-width: 4px;
        line-height: 1.7;
    }

    .modal-button-close {
        padding: 15px;
        font-size: 1rem;
    }

    .qr-fullscreen-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .qr-fullscreen-image {
        max-width: 95vw;
        max-height: 80vh;
        padding: 15px;
    }
}
