* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --accent-primary: #006eff;
    --accent-secondary: #2600ff;
    --accent-blue: #00e1ff;
    --gradient-blue: linear-gradient(135deg, #006eff, #0088ff, #00e1ff);
    --gradient-light-blue: linear-gradient(135deg, #0088ff, #006eff, #00aaff);
    --gradient-blue-purple: linear-gradient(135deg, #006eff, #7700ff, #00e1ff);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 110, 255, 0.2);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.6rem;
    color: var(--text-primary);
}

.auth-logo-text {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.auth-header h2 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 5px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.3s ease;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    cursor: pointer;
}

.input-group select {
    padding-right: 45px;
    background-image: none;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 110, 255, 0.1);
}

.input-group.focused .input-icon {
    color: var(--accent-primary);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: var(--accent-primary);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
    transition: transform 0.3s ease;
}

.input-group select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--accent-primary);
}

.auth-btn {
    background: var(--gradient-blue);
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 110, 255, 0.3);
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.forgot-password {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--accent-primary);
}

.security-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.security-info i {
    color: var(--accent-primary);
}

.input-group select {
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888888' d='M6 8L2 4h8z'/%3E%3C/svg%3E") no-repeat right 15px center;
    background-size: 12px;
}

.input-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 15px;
    border: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group select optgroup {
    background: var(--bg-primary);
    color: var(--accent-primary);
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group select optgroup option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding-left: 20px;
    position: relative;
}

.input-group select option:hover,
.input-group select option:focus {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
    color: #000;
    cursor: pointer;
}

.input-group select option:checked {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
    color: #000;
    font-weight: 600;
}

.input-group select option:disabled {
    background: var(--bg-primary);
    color: var(--text-muted);
    font-style: italic;
}

.input-group select::-webkit-scrollbar {
    width: 8px;
}

.input-group select::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.input-group select::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.input-group select::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), transparent);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    background: linear-gradient(135deg, var(--accent-blue), transparent);
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.input-group:hover .input-icon {
    color: var(--accent-primary);
}

.input-group:hover select {
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .auth-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .floating-shape {
        display: none;
    }
    
    .input-group select {
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .input-group input,
    .input-group select {
        padding: 12px 12px 12px 40px;
        font-size: 16px; 
    }
    
    .input-group select {
        background-position: right 12px center;
    }
}

.error-message {
    color: #ff4444;
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.input-group select {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.input-group select:invalid {
    color: var(--text-muted);
}

.input-group select:focus:invalid {
    color: var(--text-primary);
}

.input-group select,
.input-group select option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group select:focus {
    transform: translateY(-1px);
}

.input-group.select-valid select {
    border-color: var(--accent-primary);
}

.input-group.select-invalid select {
    border-color: #ff4444;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
        align-items: flex-start;
        min-height: 100vh;
        padding-top: 20px;
    }
    
    .auth-card {
        padding: 25px 20px;
        border-radius: 15px;
        max-width: 100%;
        margin-top: 10vh;
    }
    
    .auth-header {
        margin-bottom: 25px;
    }
    
    .auth-logo {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .auth-form {
        gap: 15px;
    }
    
    .input-group input,
    .input-group select {
        padding: 14px 14px 14px 42px;
        font-size: 16px; 
        min-height: 50px;
    }
    
    .input-group select {
        padding-right: 42px;
    }
    
    .input-icon {
        left: 12px;
    }
    
    .password-toggle,
    .select-arrow {
        right: 12px;
    }
    
    .auth-btn {
        padding: 14px;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .auth-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .floating-shape {
        display: none;
    }
    
    .error-message {
        font-size: 0.9rem;
        padding: 10px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 5px;
        padding-top: 10px;
    }
    
    .auth-card {
        padding: 20px 15px;
        margin-top: 5vh;
    }
    
    .auth-header {
        margin-bottom: 20px;
    }
    
    .auth-logo {
        font-size: 1.3rem;
    }
    
    .auth-header h2 {
        font-size: 1.3rem;
    }
    
    .input-group input,
    .input-group select {
        padding: 12px 12px 12px 40px;
        min-height: 46px;
    }
    
    .input-group select {
        padding-right: 40px;
    }
    
    .auth-btn {
        padding: 12px;
        min-height: 46px;
        font-size: 0.95rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .auth-btn {
        min-height: 50px;
    }
    
    .input-group input,
    .input-group select {
        border-width: 2px;
    }
    
    .password-toggle,
    .forgot-password {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Предотвращение зума при фокусе на iOS */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}