:root {
    --primary: #4fc3f7;
    --dark: #32353C;
    --light: #ecebe5;
    --white: #ffffff;
    --error: #ff5252;
    --success: #4caf50;
}

* {
    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(rgba(236, 235, 229, 0.5), rgba(236, 235, 229, 0)), 
                url('../images/deep_water.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

.auth-container {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.auth-header h1 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--dark);
    font-size: 14px;
    opacity: 0.8;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.auth-form {
    display: none;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light);
    background: var(--white);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: var(--error);
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.error-message.show {
    display: block;
}

.oauth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.oauth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--light);
}

.oauth-divider span {
    position: relative;
    background: var(--white);
    padding: 0 15px;
    font-size: 14px;
    color: var(--dark);
    opacity: 0.6;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--light);
    background: var(--white);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.oauth-btn:hover {
    background: var(--light);
    border-color: var(--dark);
}

.google-btn {
    color: var(--dark);
}

.facebook-btn {
    background: #1877f2;
    border-color: #1877f2;
    color: var(--white);
}

.facebook-btn:hover {
    background: #166fe5;
    border-color: #166fe5;
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Mobile optimization */
@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: stretch;
    }
    
    .auth-container {
        max-width: 100%;
        min-height: 100vh;
        padding: 30px 20px;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-header .logo {
        max-width: 160px;
    }
}
