/* auth.css - Исправленная версия с горизонтальными табами */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.row {
    width: 100%;
    max-width: 800px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    width: 100%;
}

.login-box {
    padding: 0;
    width: 100%;
}

/* Tabs - ИСПРАВЛЕННАЯ ЧАСТЬ */
.login-snip {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.login-snip input[type="radio"] {
    display: none;
}

.tabs-container {
    display: flex;
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
}

.login-snip .tab {
    flex: 1;
    text-align: center;
    padding: 25px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
}

.login-snip .tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.login-snip .sign-in:checked + .tab,
.login-snip .sign-up:checked + .tab {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: white;
}

/* Login Space */
.login-space {
    padding: 40px;
}

/* Forms */
.group {
    margin-bottom: 30px;
    position: relative;
}

.label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    height: 55px;
}

.input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Checkbox */
.group .check {
    display: none;
}

.group label[for="check"] {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 15px;
}

.group .icon {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.group .check:checked + label .icon {
    background: #667eea;
    border-color: #667eea;
}

.group .check:checked + label .icon::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Button */
.button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 55px;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.button:active {
    transform: translateY(-1px);
}

/* HR */
.hr {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e1e1e1, transparent);
    margin: 35px 0;
    position: relative;
}

.hr::before {
    content: 'or';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 20px;
    color: #666;
    font-size: 14px;
}

/* Footer links */
.foot {
    text-align: center;
    margin-top: 20px;
}

.foot a,
.foot label {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 15px;
}

.foot a:hover,
.foot label:hover {
    color: #764ba2;
}

/* Flashed messages */
.flashes {
    list-style: none;
    padding: 20px 40px;
    margin: 0;
}

.flashes li {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-weight: 500;
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
    animation: slideIn 0.3s ease;
    font-size: 14px;
}

.flashes li:last-child {
    margin-bottom: 0;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form switching */
.sign-up-form {
    display: none;
}

.login-snip .sign-up:checked ~ .login-space .login {
    display: none;
}

.login-snip .sign-up:checked ~ .login-space .sign-up-form {
    display: block;
    animation: fadeIn 0.5s ease;
}

.login-snip .sign-in:checked ~ .login-space .sign-up-form {
    display: none;
}

.login-snip .sign-in:checked ~ .login-space .login {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .row {
        max-width: 90%;
    }
    
    .login-space {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .row {
        max-width: 95%;
    }
    
    .login-space {
        padding: 20px;
    }
    
    .login-snip .tab {
        padding: 20px 15px;
        font-size: 16px;
    }
    
    .input,
    .button {
        height: 50px;
        padding: 15px;
    }
}
