:root {
    --bg-color: #0b0f19;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.3);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.2);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -50px); }
    66% { transform: translate(-20px, 20px); }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    width: 100%;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.hero {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    animation: fadeIn 1s ease-out forwards;
}

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

.title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
}

.highlight {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.tg-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.5);
}

.tg-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px -10px rgba(59, 130, 246, 0.7);
}

.tg-icon {
    width: 24px;
    height: 24px;
}

.bot-note {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #64748b;
}

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

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content.glass-panel {
    background: #0f172a; /* Убираем прозрачность, ставим сплошной темный цвет */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

#auth-section h2, #config-section h2 {
    margin-bottom: 16px;
}

#auth-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

input[type="password"]:focus {
    border-color: var(--accent);
}

.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: var(--accent-hover);
}

.error-msg {
    color: #ef4444;
    margin-top: 12px;
    font-size: 0.9rem;
    text-align: center;
    min-height: 20px;
}

.hidden {
    display: none !important;
}

.config-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.config-item .label {
    color: var(--text-secondary);
}

.config-item .value {
    font-weight: 600;
    color: #60a5fa;
}

#config-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.prompt-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #cbd5e1;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
}

@media (max-width: 600px) {
    .title { font-size: 2.5rem; }
    .header { padding: 16px 24px; }
    .glass-panel { padding: 24px; }
    .config-item { flex-direction: column; gap: 4px; }
}
