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

body {
    background: #000;
    overflow-x: hidden;
}

/* СКРЫВАЕМ NAVBAR И FOOTER */
.navbar, .footer {
    display: none !important;
}

.main-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Фон */
.register-wrapper {
    min-height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 212, 59, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.08) 0%, transparent 40%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

/* Контейнер */
.register-container {
    max-width: 550px;
    width: 100%;
}

/* Карточка регистрации */
.register-card {
    background: rgba(20, 20, 20, 0.95);
    border: 3px solid rgba(255, 212, 59, 0.4);
    border-radius: 24px;
    padding: 2rem; /* Уменьшили с 3rem для компактности */
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(255, 212, 59, 0.2);
    backdrop-filter: blur(10px);
}

/* Заголовок */
.register-header {
    text-align: center;
    margin-bottom: 1.5rem; /* Уменьшили с 2.5rem */
}

.register-icon {
    width: 60px; /* Уменьшили с 70px */
    height: 60px; /* Уменьшили с 70px */
    margin: 0 auto 1rem; /* Уменьшили отступ снизу с 1.5rem */
    background: linear-gradient(135deg, #FFD43B 0%, #FFC107 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 40px rgba(255, 212, 59, 0.5);
}

.register-header h2 {
    font-size: 1.8rem; /* Уменьшили с 2rem */
    font-weight: 900;
    background: linear-gradient(135deg, #FFD43B 0%, #FFC107 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem; /* Уменьшили с 0.8rem */
}

.register-header p {
    color: #999;
    font-size: 1rem;
}

/* Форма */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Уменьшили с 1.5rem для компактности */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* Уменьшили с 0.6rem */
}

.form-label {
    color: #FFD43B;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 212, 59, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem; /* Уменьшили с 1rem 1.2rem для компактности */
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #FFD43B;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 20px rgba(255, 212, 59, 0.3);
}

.form-control::placeholder {
    color: #666;
}

.form-control.error {
    border-color: #ff5252;
}

.form-control.success {
    border-color: #4CAF50;
}

.form-hint {
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.form-error {
    color: #ff5252;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: none;
}

.form-success {
    color: #4CAF50;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: none;
}

/* Кнопка регистрации */
.btn-submit {
    background: linear-gradient(135deg, #FFD43B 0%, #FFC107 100%);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem; /* Уменьшили с 1.2rem для компактности */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(255, 212, 59, 0.4);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 212, 59, 0.6);
}

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

/* Разделитель */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 212, 59, 0.2);
}

.divider span {
    background: rgba(20, 20, 20, 0.95);
    padding: 0 1rem;
    color: #999;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Кнопка входа */
.btn-login-link {
    background: rgba(255, 212, 59, 0.1);
    color: #FFD43B;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem;
    border: 2px solid rgba(255, 212, 59, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
}

.btn-login-link:hover {
    background: rgba(255, 212, 59, 0.2);
    border-color: #FFD43B;
    transform: translateY(-2px);
}

/* Футер */
.register-footer {
    margin-top: 1.2rem; /* Уменьшили с 2rem */
    padding-top: 1rem; /* Уменьшили с 1.5rem */
    border-top: 1px solid rgba(255, 212, 59, 0.2);
    text-align: center;
}

.back-link {
    color: #FFD43B;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

/* Telegram info */
.telegram-info {
    background: rgba(33, 150, 243, 0.1);
    border: 2px solid rgba(33, 150, 243, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.telegram-info i {
    font-size: 1.5rem;
    color: #2196F3;
}

.telegram-info p {
    color: #2196F3;
    font-size: 0.9rem;
    margin: 0;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

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

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

.modal-content {
    background: rgba(20, 20, 20, 0.98);
    border: 3px solid rgba(33, 150, 243, 0.5);
    border-radius: 24px;
    padding: 2.4rem; /* Уменьшили на 20% */
    max-width: 800px; /* Уменьшили на 20% */
    width: 95%;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.9),
        0 0 100px rgba(33, 150, 243, 0.3);
    animation: slideUp 0.4s ease;
}

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

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #2196F3 0%, #0D47A1 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 40px rgba(33, 150, 243, 0.6);
    animation: pulse 2s infinite;
}

.modal-content h3 {
    font-size: 1.6rem; /* Уменьшили на 20% */
    font-weight: 900;
    background: linear-gradient(135deg, #2196F3 0%, #FFD43B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem; /* Уменьшили на 20% */
    text-align: center;
}

.modal-content p {
    color: #ccc;
    text-align: center;
    margin-bottom: 1.6rem; /* Уменьшили на 20% */
}

.telegram-display-modal {
    color: #2196F3;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 2rem;
}

.code-input-modal {
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(33, 150, 243, 0.4);
    border-radius: 16px;
    padding: 1.2rem; /* Уменьшили на 20% */
    color: #2196F3;
    font-size: 2rem; /* Уменьшили на 20% */
    font-weight: 900;
    text-align: center;
    letter-spacing: 12px; /* Уменьшили на 20% */
    width: 100%;
    margin-bottom: 1.2rem; /* Уменьшили на 20% */
}

.code-input-modal:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.5);
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-open-bot-modal {
    background: linear-gradient(135deg, #2196F3 0%, #0D47A1 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.4);
    text-decoration: none;
}

.btn-open-bot-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(33, 150, 243, 0.6);
}

.btn-verify-modal {
    background: linear-gradient(135deg, #FFD43B 0%, #FFC107 100%);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(255, 212, 59, 0.4);
}

.btn-verify-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 212, 59, 0.6);
}

.modal-info {
    background: rgba(33, 150, 243, 0.1);
    border: 2px solid rgba(33, 150, 243, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: center;
}

.modal-info p {
    color: #2196F3;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

/* Адаптив */
@media (max-width: 1200px) {
    /* Планшеты landscape */
    .modal-content {
        max-width: 700px;
        padding: 2rem;
    }
    
    .telegram-methods {
        gap: 1.5rem !important;
    }
    
    .method-box {
        padding: 1.5rem !important;
        min-height: 320px !important;
    }
}

@media (max-width: 992px) {
    /* Планшеты portrait */
    .modal-content {
        max-width: 600px;
        padding: 1.8rem !important;
    }
    
    .telegram-methods {
        flex-direction: column !important;
        gap: 1.2rem !important;
    }
    
    .method-separator {
        display: none !important;
    }
    
    .method-box {
        min-height: auto !important;
        padding: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    /* Телефоны landscape и маленькие планшеты */
    .register-wrapper {
        padding: 2rem 1rem;
    }
    
    .register-card {
        padding: 2rem 1.5rem;
    }
    
    .modal-content {
        padding: 1.5rem !important;
        max-width: 95%;
        width: 95%;
    }
    
    .code-input-modal {
        font-size: 1.6rem !important;
        letter-spacing: 8px !important;
        padding: 1rem !important;
    }
    
    .method-box {
        padding: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    /* Телефоны portrait */
    .register-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .register-card {
        padding: 1.5rem 1rem;
    }
    
    .modal-content {
        padding: 1.2rem !important;
        border-radius: 16px;
    }
    
    .modal-content h3 {
        font-size: 1.3rem !important;
    }
    
    .code-input-modal {
        font-size: 1.4rem !important;
        letter-spacing: 6px !important;
        padding: 0.8rem !important;
    }
    
    .method-box {
        padding: 1rem !important;
        border-radius: 12px;
    }
    
    .method-box p {
        font-size: 0.75rem !important;
    }
    
    .btn-open-bot-modal,
    .btn-verify-modal {
        padding: 0.8rem !important;
        font-size: 0.8rem !important;
    }
    
    #userCodeDisplay {
        font-size: 1.5rem !important;
        letter-spacing: 4px !important;
    }
}

@media (max-width: 400px) {
    /* Очень маленькие телефоны */
    .modal-content {
        padding: 1rem !important;
    }
    
    .code-input-modal {
        font-size: 1.2rem !important;
        letter-spacing: 4px !important;
    }
    
    #userCodeDisplay {
        font-size: 1.3rem !important;
        letter-spacing: 3px !important;
    }
}
                #copyCodeBtn:hover {
                    background: rgba(255, 212, 59, 0.4) !important;
                    border-color: #FFD43B !important;
                    transform: translateY(-2px);
                    box-shadow: 0 5px 20px rgba(255, 212, 59, 0.4);
                }
                
                @media (max-width: 768px) {
                    .modal-content {
                        padding: 2rem !important;
                    }
                    #telegramStep > div:first-of-type {
                        flex-direction: column !important;
                        gap: 1.5rem !important;
                    }
                    #telegramStep > div:first-of-type > div:nth-child(2) {
                        display: none !important;
                    }
                    #telegramStep > div:first-of-type > div {
                        min-height: auto !important;
                        padding: 1.5rem !important;
                    }
                    #telegramStep > div:first-of-type::after {
                        content: 'ИЛИ';
                        display: block;
                        text-align: center;
                        color: #FFD43B;
                        font-weight: 700;
                        font-size: 1.1rem;
                        margin: 1rem 0;
                        padding: 0.5rem;
                        background: rgba(20, 20, 20, 0.98);
                        border: 2px solid rgba(255, 212, 59, 0.3);
                        border-radius: 8px;
                        position: relative;
                    }
                    #telegramStep > div:first-of-type::before {
                        content: '';
                        display: block;
                        height: 1px;
                        background: rgba(255, 212, 59, 0.2);
                        margin: 1rem 0;
                    }
                }
/* ============================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ - НАВИГАЦИЯ
   ============================================ */

/* Улучшение навигации для мобильных */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .navbar-brand i {
        font-size: 1.3rem;
    }
    
    .navbar-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(10px);
        padding: 80px 20px 20px 20px;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        border-right: 2px solid rgba(255, 212, 59, 0.4);
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        margin: 0.5rem 0;
        border-radius: 12px;
        font-size: 1rem;
        min-height: 48px;
        background: rgba(255, 212, 59, 0.05);
        border: 1px solid rgba(255, 212, 59, 0.2);
    }
    
    .nav-link.active {
        background: rgba(255, 212, 59, 0.2);
        border-color: rgba(255, 212, 59, 0.5);
    }
    
    .nav-link i {
        margin-right: 0.75rem;
        font-size: 1.1rem;
    }
    
    .nav-user {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem 1rem;
        margin-top: 2rem;
        border-top: 1px solid rgba(255, 212, 59, 0.2);
    }
    
    .nav-user .username {
        font-size: 1rem;
        padding: 0.75rem;
        background: rgba(255, 212, 59, 0.1);
        border-radius: 10px;
        text-align: center;
    }
    
    .nav-user .btn {
        width: 100%;
        padding: 0.75rem;
        min-height: 48px;
    }
    
    /* Overlay для navbar */
    .navbar::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: 999;
    }
    
    .navbar-menu.active ~ .navbar::after {
        opacity: 1;
        pointer-events: all;
    }
}

/* ============================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ - ФОРМЫ LOGIN
   ============================================ */

/* Добавляем в login.css */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .login-header {
        margin-bottom: 2rem;
    }
    
    .login-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        padding: 0.85rem 1rem;
        font-size: 16px !important; /* Предотвращает zoom на iOS */
        border-radius: 12px;
        min-height: 48px;
    }
    
    .input-icon {
        padding: 0.85rem 1rem;
        font-size: 1.1rem;
    }
    
    .btn-primary {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 12px;
    }
    
    .form-footer {
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }
    
    .form-link {
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .login-box {
        padding: 2.5rem 2rem;
        max-width: 450px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .form-control {
        font-size: 16px !important;
        min-height: 48px;
    }
    
    .btn-primary {
        min-height: 50px;
    }
}

/* ============================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ - ФОРМЫ REGISTER
   ============================================ */

/* Добавляем в register.css */
@media (max-width: 480px) {
    .register-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .register-box {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .register-header {
        margin-bottom: 2rem;
    }
    
    .register-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .register-subtitle {
        font-size: 0.9rem;
    }
    
    /* Все input поля */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        padding: 0.85rem 1rem;
        font-size: 16px !important; /* Критично для iOS */
        border-radius: 12px;
        min-height: 48px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .btn-register {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 12px;
    }
    
    /* Чекбоксы и радио кнопки */
    .checkbox-label,
    .radio-label {
        min-height: 44px;
        padding: 0.75rem;
    }
    
    /* Шаги регистрации (если есть) */
    .step-indicator {
        margin-bottom: 1.5rem;
    }
    
    .step {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .form-footer {
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .register-container {
        padding: 1.5rem;
    }
    
    .register-box {
        padding: 2.5rem 2rem;
        max-width: 500px;
    }
    
    .register-title {
        font-size: 2rem;
    }
    
    .form-control,
    input,
    select,
    textarea {
        font-size: 16px !important;
        min-height: 48px;
    }
    
    .btn-register {
        min-height: 50px;
    }
}

/* ============================================
   📱 ОБЩИЕ УЛУЧШЕНИЯ ДЛЯ ФОРМ
   ============================================ */

/* Touch-friendly для всех форм */
@media (hover: none) and (pointer: coarse) {
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Увеличиваем активную область */
    input,
    select,
    textarea {
        touch-action: manipulation;
    }
    
    /* Убираем подсветку tap на iOS */
    button,
    .btn,
    a {
        -webkit-tap-highlight-color: rgba(255, 212, 59, 0.2);
    }
}

/* Предотвращение zoom при фокусе input на iOS */
input,
select,
textarea {
    font-size: 16px !important;
}

/* Улучшение прокрутки */
.login-box,
.register-box,
.navbar-menu {
    -webkit-overflow-scrolling: touch;
}

