/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* Auth Card Styles */
.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.auth-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label {
    margin: 0 !important;
    font-weight: normal !important;
}

.form-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Social Login Styles */
.social-login {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.social-login p {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.social-buttons {
    display: flex;
    gap: 10px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #333;
}

.btn-social:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.btn-google {
    border-color: #db4437;
    color: #db4437;
}

.btn-google:hover {
    border-color: #db4437;
    background: #fef5f4;
}

.btn-github {
    border-color: #333;
    color: #333;
}

.btn-github:hover {
    border-color: #333;
    background: #f5f5f5;
}

.btn-discord {
    border-color: #5865F2;
    color: #5865F2;
}

.btn-discord:hover {
    border-color: #5865F2;
    background: #f5f6fe;
}

/* Messages and Errors */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-info {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

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

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Error List */
.errorlist {
    list-style: none;
    color: #c33;
    font-size: 13px;
    margin-top: 4px;
}

.errorlist li {
    margin-bottom: 4px;
}

/* Home Page Specific Styles */
.home-authenticated {
    text-align: center;
    margin-top: 20px;
}

.login-success-message {
    color: #666;
    margin-bottom: 20px;
}

.home-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.home-nav {
    margin-top: 30px;
}

/* Button Link Styles */
.btn-link {
    text-decoration: none;
    display: inline-block;
}

.home-buttons .btn-link {
    flex: 1;
    text-align: center;
}

.btn-secondary {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Django Message Tags Compatibility */
.alert.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert.info, .alert.warning {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .auth-card {
        padding: 30px 20px;
        border-radius: 15px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .btn-primary {
        padding: 12px;
        font-size: 15px;
    }

    .social-buttons {
        flex-direction: column;
    }

    .btn-social {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .auth-card {
        padding: 20px 15px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
}
