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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: white;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 103, 31, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 103, 31, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin-bottom: 3rem;
}

.logo {
    width: 120px;
    height: 30px;
}

.language-switcher {
    position: relative;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #888888;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 60px;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.current-lang {
    font-weight: 600;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(20px);
    padding: 8px 0;
    min-width: 180px;
    z-index: 1000;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff671f;
}

.language-option.current {
    background: rgba(255, 103, 31, 0.1);
    color: #ff671f;
}

.lang-code {
    font-weight: 600;
    min-width: 24px;
}

.lang-name {
    font-size: 0.9rem;
}

.auth-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 2.5rem;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    color: #888;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff671f, #ff8c42);
    color: white;
    transform: translateY(-1px);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #aaa;
    font-size: 1.1rem;
}

.google-btn {
    width: 100%;
    padding: 16px;
    background: white;
    color: #333;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: #666;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 0 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ff671f;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 103, 31, 0.1);
}

.form-input::placeholder {
    color: #666;
}

.input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.custom-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background: #ff671f;
    border-color: #ff671f;
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

.checkbox-label a {
    color: #ff671f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-label a:hover {
    color: #ff8c42;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff671f, #ff8c42);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 103, 31, 0.3);
}

.form-links {
    text-align: center;
    color: #999;
}

.form-links a {
    color: #ff671f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #ff8c42;
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

.forgot-password a {
    color: #ff671f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #ff8c42;
    text-decoration: underline;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

/* Recovery form - завжди видима (без табів) */
.recovery-form {
    display: block;
}

/* Alert повідомлення для recovery сторінки */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    margin-bottom: 24px;
}

.alert-success i {
    color: #ff671f;
    font-size: 16px;
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    margin-bottom: 24px;
}

.alert-error i {
    color: #ff671f;
    font-size: 16px;
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .header {
        margin-bottom: 2rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .auth-container {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .form-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }
}