/* Основные стили */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Выбор пользователя */
.user-selection {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.user-selection h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #667eea;
}

.subtitle {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1em;
}

/* Форма логина */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.user-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.user-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.user-avatar {
    font-size: 4em;
    margin-bottom: 20px;
}

.user-card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.user-stats {
    text-align: left;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.user-stats p {
    margin: 8px 0;
    color: #666;
}

.user-stats strong {
    color: #667eea;
    font-size: 1.1em;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover {
    background: #5568d3;
}

/* Навигация */
.nav {
    background: white;
    padding: 15px 0;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.nav-logo {
    font-size: 1.3em;
    font-weight: bold;
    line-height: 0.65;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    height: 30px;
    overflow: hidden;
}

.nav-logo a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-logo a:hover {
    opacity: 0.8;
}

.logo-ru {
    color: #f44336;
}

.logo-dgt {
    color: #667eea;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0;
}

.nav a {
    text-decoration: none;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav a:hover {
    background: #f0f0f0;
}

/* Гамбургер меню */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    top: 15px;
    right: 20px;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #667eea;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Адаптивность */
@media (max-width: 1280px) {
    .user-selection {
        padding: 20px;
    }

    .user-selection h1 {
        font-size: 2em;
    }

    .user-cards {
        grid-template-columns: 1fr;
    }

    /* Мобильное меню */
    .nav {
        padding: 15px 50px 15px 20px;
        min-height: 60px;
    }

    .nav-logo {
        font-size: 1.1em;
        line-height: 0.65;
        padding: 0;
        margin: 0;
        height: 30px;
        overflow: hidden;
    }

    .hamburger {
        display: flex;
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        gap: 0;
        overflow-y: auto;
    }

    .nav-logo {
        z-index: 1001;
        position: relative;
    }

    .nav ul.active {
        right: 0;
    }

    .nav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav ul li:last-child {
        border-bottom: none;
    }

    .nav a {
        display: block;
        width: 100%;
        padding: 15px 20px;
        border-radius: 0;
    }

    .nav a:hover {
        background: #f8f9fa;
    }

    /* Mobile "Native App" Feel */
    body {
        padding: 0;
        background: #f8f9fa;
        /* Remove gradient, use flat color */
    }

    .container {
        width: 100%;
        margin: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .nav {
        border-radius: 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: white;
    }
}