/* style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg-dark: #0f0f23;
    --bg-darker: #0a0a1a;
    --bg-panel: #1a1a2e;
    --bg-editor: #151529;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #2d3748;
    --success: #10b981;
    --error: #ef4444;
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 20%);
}

.header {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 100;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    color: white;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions .icon-btn {
    width: auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.container {
    display: flex;
    height: calc(100vh - 65px);
    position: relative;
}

.editor-panel {
    width: 35%;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    transition: width 0.1s ease;
}

.editor-header {
    padding: 16px 24px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-tabs {
    display: flex;
    gap: 8px;
}

.file-tab {
    padding: 8px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.file-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.file-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.editor-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    min-height: 0;
}



.code-highlight::-webkit-scrollbar {
    display: none;
}

.code-highlight code {
    display: block;
    padding: 0;
    background: transparent !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: pre !important;
    word-wrap: normal !important;
    word-break: normal !important;
}

.code-highlight code * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.monaco-container {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.code-editor::selection {
    background: rgba(99, 102, 241, 0.3);
}

.input-section {
    padding: 20px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
}

.input-options {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(25, 25, 40, 0.9));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 10px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.toggle-switch:hover::before {
    left: 100%;
}

.toggle-switch:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.toggle-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: linear-gradient(135deg, #475569, #334155);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.switch.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(99, 102, 241, 0.3),
        0 0 20px rgba(99, 102, 241, 0.4);
}

.switch-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch.active .switch-slider {
    transform: translateX(24px);
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(99, 102, 241, 0.3);
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #64748b;
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.switch.active .switch-slider::before {
    background: var(--primary);
    opacity: 1;
}

/* Анимация для активного состояния */
@keyframes switchGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.6); }
}

.switch.active {
    animation: switchGlow 2s ease-in-out infinite;
}

/* Для недоступной кнопки "Исправить" */
.toggle-switch.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.5);
}

.toggle-switch.disabled:hover {
    transform: none;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: none;
}

.tg-bot-btn {
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.tg-bot-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.input-container {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.prompt-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
}

.prompt-input::placeholder {
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.send-button {
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    font-size: 14px;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.preview-panel {
    flex: 1;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 16px 24px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-title {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-toggle {
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.device-frame {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: var(--bg-editor);
    overflow: auto;
    transition: all 0.3s ease;
    position: relative;
}

.desktop-preview {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-preview.hide {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.desktop-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.mobile-preview {
    display: none;
    width: 375px;
    height: 667px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 16px;
    box-shadow:
        var(--shadow-lg),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    border: 12px solid #2a2a2a;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
}

.mobile-preview.show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mobile-preview::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: #333;
    border-radius: 0 0 10px 10px;
    z-index: 2;
}

.mobile-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 32px;
    overflow: hidden;
}

.mobile-screen iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.mobile-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: #1a1a1a;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.resizer {
    width: 8px;
    background: var(--border);
    cursor: col-resize;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.resizer:hover {
    background: var(--primary);
}

.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: var(--text-muted);
    border-radius: 1px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .editor-panel {
        width: 100% !important;
        height: 50%;
    }

    .preview-panel {
        width: 100% !important;
        height: 50%;
    }

    .resizer {
        width: 100%;
        height: 8px;
        cursor: row-resize;
    }
}
/* Добавляем к существующему style.css */

/* Счетчик токенов */
.tokens-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0 12px;
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    height: 32px;
    margin-right: 8px;
    transition: all 0.2s;
}

.tokens-counter:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.tokens-counter i {
    font-size: 14px;
    color: var(--primary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.token-plus {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    transition: all 0.2s;
    cursor: pointer;
    margin-left: 6px;
}

.token-plus:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--success);
    transform: scale(1.1);
}

/* Кнопка регистрации */
.register-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 153, 142, 0.4);
}

/* Информация о пользователе */
/* Информация о пользователе */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 32px;
}

.user-info:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-toggle:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 8px;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    font-size: 12px;
}

.user-info i.fa-user-circle {
    font-size: 20px;
    color: var(--primary);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    color: white;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-content h2 i {
    color: #38ef7d;
}

.modal-content h3 {
    margin: 20px 0 10px 0;
    font-size: 24px;
}

.modal-content p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.6;
}


.modal-content strong {
    color: #38ef7d;
}

.modal-link {
    text-align: center;
    margin: 20px 0 10px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.modal-link a {
    color: #38ef7d;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-link a:hover {
    color: #4fffb0;
    text-decoration: underline;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: white;
    transform: rotate(90deg);
}

.register-step {
    animation: fadeIn 0.3s ease;
}

.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="text"] {
    width: 100%;
    padding: 14px;
    margin: 15px 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-content input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-content input:focus {
    outline: none;
    border-color: #38ef7d;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(56, 239, 125, 0.3);
}

.modal-btn {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 239, 125, 0.4);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modal-btn-secondary {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.modal-message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #ff6b6b;
}

.modal-message.success {
    background: rgba(56, 239, 125, 0.2);
    border: 1px solid rgba(56, 239, 125, 0.4);
    color: #38ef7d;
}

.success-icon {
    text-align: center;
    margin: 20px 0;
}

.success-icon i {
    font-size: 80px;
    color: #38ef7d;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.warning-icon {
    text-align: center;
    margin: 20px 0;
}

.warning-icon i {
    font-size: 80px;
    color: #ffd93d;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        max-width: 90%;
    }

    .tokens-counter {
        font-size: 12px;
        padding: 6px 12px;
    }

    .register-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .user-info {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Подсветка изменений в коде */
.code-change-highlight {
    background-color: rgba(46, 160, 67, 0.2) !important;
    animation: fadeHighlight 3s ease-out;
}

.code-change-glyph {
    background-color: #2ea043 !important;
    width: 3px !important;
    margin-left: 3px;
}

@keyframes fadeHighlight {
    0% {
        background-color: rgba(46, 160, 67, 0.4) !important;
    }
    100% {
        background-color: transparent !important;
    }
}

/* Стили для дропдауна пользователя */
.user-info .dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info .dropdown-toggle:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.user-info .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 8px;
    animation: dropdownFade 0.2s ease;
    backdrop-filter: blur(20px);
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-info .dropdown-item {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-darker);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.user-info .dropdown-item:last-child {
    margin-bottom: 0;
}

.user-info .dropdown-item:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.user-info .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.user-info .dropdown-item i {
    width: 16px;
    font-size: 12px;
}

/* Стили для дропдауна пользователя */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-info .dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info .dropdown-toggle:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.user-info .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 8px;
    animation: dropdownFade 0.2s ease;
    backdrop-filter: blur(20px);
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-info .dropdown-item {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info .dropdown-item:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.user-info .dropdown-item i {
    width: 16px;
    font-size: 12px;
}

.password-requirements {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #888;
    font-size: 14px;
    transition: all 0.3s ease;
}

.requirement i {
    font-size: 10px;
}

.requirement.valid {
    color: #4ade80;
}

.requirement.valid i {
    color: #4ade80;
}

.requirement.valid i::before {
    content: "\f058";
}

.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.agreement-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.agreement-checkbox label {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    margin: 0;
}

.agreement-checkbox label a {
    color: #38ef7d;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.agreement-checkbox label a:hover {
    color: #4fffb0;
    text-decoration: underline;
}

.support-btn {
    position: relative;
}

.support-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#supportMessages {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 15px;
}

.support-message {
    background: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #6366f1;
}

.support-message.admin-reply {
    border-left-color: #38ef7d;
    background: rgba(56, 239, 125, 0.1);
}

.support-message-date {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 5px;
}

/* История токенов */
.history-btn {
    position: relative;
}

.history-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: historyPulse 2s infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

@keyframes historyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

.history-modal .modal-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.history-list {
    margin: 20px 0;
}

.history-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.history-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.history-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.history-icon.registration {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.history-icon.purchase {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.history-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.history-details p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.history-amount {
    text-align: right;
}

.history-tokens {
    font-size: 22px;
    font-weight: bold;
    color: #38ef7d;
    margin-bottom: 5px;
}

.history-price {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-history i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}



.logo-image {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
}

/* Обнови существующие стили логотипа */
.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    font-size: 20px;
}

