.ref-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Основная карточка */
.referral-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 3rem;
    max-width: 1200px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    margin: 2rem auto;
}

.referral-card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.3);
}

/* Левая часть */
.card-left {
    display: flex;
    flex-direction: column;
}

.ref-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.coin-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-gold);
    padding: 1rem;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    transition: var(--transition);
}

.coin-image:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.5);
}

.ref-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: white;
    line-height: 1.3;
}

.gradient-text {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ref-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.ref-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.5;
}

.ref-benefits li i {
    color: #06b6d4;
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Правая часть */
.card-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-wrapper {
    width: 220px;
    height: 220px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code {
    width: 200px !important;
    height: 200px !important;
    border-radius: 8px;
    background: white;
    padding: 0.5rem;
}

.qr-label {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Контейнер ссылки */
.link-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.link-pill {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}

.link-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.copy-btn {
    flex-shrink: 0;
    padding: 1rem 2rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
}

.copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Статус */
.status-hint {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-hint i {
    font-size: 1.1rem;
}

/* Действия */
.ref-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.lock-indicator {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.lock-indicator:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.lock-indicator svg {
    width: 24px;
    height: 24px;
    fill: #ef4444;
    transition: var(--transition);
}

.lock-indicator.unlocked svg {
    fill: #10b981;
}

.verify-btn {
    flex: 1;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
}

.logout-btn {
    flex: 1;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Секция генерации */
.generate-section {
    width: 100%;
    margin-bottom: 1.5rem;
}

.generate-btn {
    width: 100% !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Заметка */
.ref-note {
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ref-note i {
    font-size: 1rem;
}

/* Модальное окно */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: rgba(10, 14, 35, 0.95);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: white;
    transform: scale(1.1);
}

.modal-content {
    margin-bottom: 2rem;
}

.modal-subtitle {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.input-hint {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.modal-requirements {
    background: rgba(124, 58, 237, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.modal-requirements h4 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.modal-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-requirements li {
    color: #cbd5e1;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.modal-requirements li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    flex-shrink: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Toast уведомление */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
/* Адаптивность */
@media (max-width: 1200px) {
    .referral-card {
        max-width: 900px;
        gap: 2rem;
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .referral-card {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .card-left, .card-right {
        width: 100%;
    }
    
    .ref-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .ref-benefits {
        text-align: center;
    }
    
    .ref-benefits li {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .referral-card {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .hero h1 span:first-child {
        font-size: 2rem !important;
    }
    
    .hero h1 span:last-child {
        font-size: 1.5rem !important;
    }
    
    .security-badge {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
        width: 90%;
        margin: 1rem auto;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .link-pill {
        width: 100%;
        text-align: center;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .ref-actions {
        flex-direction: column;
    }
    
    .lock-indicator {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .verify-btn, .logout-btn {
        width: 100%;
    }
    
    .modal {
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ref-title {
        font-size: 1.5rem;
    }
    
    .ref-benefits li {
        font-size: 1rem;
        text-align: left;
        justify-content: flex-start;
    }
    
    .qr-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .qr-code {
        width: 160px !important;
        height: 160px !important;
    }
    
    .hero h1 span:first-child {
        font-size: 1.5rem !important;
    }
    
    .hero h1 span:last-child {
        font-size: 1.2rem !important;
    }
    
    .modal {
        padding: 1rem;
    }
}

/* Анимации состояний */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes unlock {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.unlock-animation {
    animation: unlock 0.6s ease;
}

.qr-pulse {
    animation: pulse 2s infinite;
}

/* Стили для успешной верификации */
.status-verified {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
}

.link-active {
    background: rgba(16, 185, 129, 0.05) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
}

/* Загрузочный индикатор */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Анимация чисел статистики */
.stat-number {
    animation: countUp 2s ease-out forwards;
}

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

/* Эффект для ссылки при копировании */
.copy-success {
    animation: copyFlash 0.6s ease;
}

@keyframes copyFlash {
    0%, 100% { background: rgba(255, 255, 255, 0.05); }
    50% { background: rgba(16, 185, 129, 0.2); }
}