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

:root {
    --bg: #050505;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.05);
    --surface-3: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: #666666;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --nerox: #ffffff;
    --czeio: #ffffff;
    --blur: 20px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.login-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.7);
    z-index: -1;
}

.login-sound-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 100;
    transition: all 0.2s;
}

.login-sound-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

.login-sound-btn.active {
    color: #00d4aa;
    border-color: rgba(0, 212, 170, 0.3);
}

/* SPLASH SCREEN */
.splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
}

.splash-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: splash-pulse 2s ease-in-out infinite;
}

.splash-ring:first-child {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.splash-ring.r2 {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    animation-delay: 0.3s;
    border-color: rgba(255, 255, 255, 0.15);
}

.splash-core {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    background: var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splash-core-pulse 2s ease-in-out infinite;
}

.splash-icon {
    width: 24px;
    height: 24px;
    color: var(--bg);
}

@keyframes splash-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.6; }
}

@keyframes splash-core-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.splash-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 40px;
    min-height: 2.5rem;
}

.splash-title .char {
    display: inline-block;
    opacity: 0;
    animation: char-fade 0.3s ease forwards;
}

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

.splash-loader {
    width: 200px;
    height: 2px;
    background: var(--surface-2);
    margin: 0 auto;
    border-radius: 1px;
    overflow: hidden;
}

.loader-line {
    width: 0%;
    height: 100%;
    background: var(--text);
    border-radius: 1px;
    animation: loader-fill 1.5s ease forwards;
}

@keyframes loader-fill {
    to { width: 100%; }
}

/* PAGE */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.page.visible {
    opacity: 1;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
    padding: 40px 20px;
}

/* HEADER */
.header {
    text-align: center;
    margin-bottom: 60px;
}

/* LOGO - rotating rings + pulse */
.logo {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.logo-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-ring:first-child {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: ring-rotate 8s linear infinite, logo-pulse 3s ease-in-out infinite;
}

.logo-ring.r2 {
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    border-color: rgba(255, 255, 255, 0.15);
    animation: ring-rotate 6s linear infinite reverse, logo-pulse 3s ease-in-out 0.5s infinite;
}

@keyframes ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logo-pulse {
    0%, 100% { opacity: 0.3; border-color: rgba(255, 255, 255, 0.1); }
    50% { opacity: 0.7; border-color: rgba(255, 255, 255, 0.25); }
}

.logo-core {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    background: var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: core-pulse 3s ease-in-out infinite;
}

@keyframes core-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
    50% { transform: scale(1.08); box-shadow: 0 0 20px 2px rgba(255,255,255,0.15); }
}

.logo-core svg {
    width: 20px;
    height: 20px;
    color: var(--bg);
}

/* TITLE - staggered fade+slide */
.title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    overflow: hidden;
}

.title .char {
    display: inline-block;
    opacity: 0;
    animation: title-char-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes title-char-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fade-up 0.6s ease 0.8s forwards;
}

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

/* BOT CARDS - shimmer + glow */
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.bot-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 50px 30px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    z-index: 0;
    pointer-events: none;
}

.bot-card.loaded .card-shimmer {
    animation: shimmer-run 1.2s ease forwards;
}

@keyframes shimmer-run {
    0% { left: -60%; opacity: 0; }
    30% { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bot-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255,255,255,0.03);
}

.bot-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

.bot-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-avatar i {
    font-size: 28px;
    color: var(--text-muted);
}

.bot-card:hover .bot-avatar {
    border-color: var(--text);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.bot-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bot-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.bot-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* FOOTER */
.footer {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer i {
    margin-right: 6px;
    opacity: 0.5;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

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

.modal-content {
    background: var(--surface);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 50px 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* MODAL ICON - pulse ring */
.modal-icon {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
}

.modal-icon-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: modal-ring-pulse 2.5s ease-in-out infinite;
}

.modal-icon-ring.r2 {
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-color: rgba(255, 255, 255, 0.05);
    animation-delay: 0.4s;
}

@keyframes modal-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.06); opacity: 0.7; }
}

.modal-icon-core {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    animation: core-pulse 3s ease-in-out infinite;
    overflow: hidden;
}

.modal-icon-core svg,
.modal-icon-core i {
    width: 28px;
    height: 28px;
    color: var(--text);
}

.modal-icon-core i {
    font-size: 28px;
}

.modal-icon-core img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.muted {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.login-input-wrap {
    position: relative;
    margin-bottom: 16px;
}

.login-input-wrap i:first-child {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-input-wrap input {
    width: 100%;
    padding: 16px 50px 16px 48px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.login-input-wrap input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--surface-3);
}

.login-input-wrap input::placeholder {
    color: var(--text-muted);
}

.login-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.login-eye:hover {
    color: var(--text);
}

#login-btn {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--text);
    color: var(--bg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.03em;
}

#login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

#login-btn:active {
    transform: translateY(0);
}

.error {
    color: #ff4444;
    margin-top: 16px;
    min-height: 20px;
    font-size: 0.9rem;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .title { font-size: 1.6rem; }
    .splash-title { font-size: 1.5rem; }
    .bot-grid { grid-template-columns: 1fr; }
    .footer { flex-direction: column; gap: 12px; }
    .modal-content { padding: 40px 24px; }
}
