/* OAuth Login/Register Buttons */

.oauth-section {
    margin: 20px 0;
    text-align: center;
}

.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-tertiary, #888);
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.2));
}

.oauth-divider span {
    padding: 0 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background-color: var(--btn-color, #333);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.oauth-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: #ffffff;
}

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

.oauth-btn i {
    font-size: 18px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Provider-specific colors */
.oauth-btn-discord {
    background-color: #5865F2;
}

.oauth-btn-discord:hover {
    background-color: #4752C4;
}

.oauth-btn-microsoft {
    background-color: #2F2F2F;
}

.oauth-btn-microsoft:hover {
    background-color: #1a1a1a;
}

.oauth-btn-google {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ddd;
}

.oauth-btn-google:hover {
    background-color: #f8f8f8;
    color: #333333;
}

.oauth-btn-facebook {
    background-color: #1877F2;
}

.oauth-btn-twitter,
.oauth-btn-x {
    background-color: #000000;
}

/* OAuth Error/Success Messages */
.oauth-message {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    font-size: 14px;
}

.oauth-error {
    background-color: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.oauth-success {
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

.oauth-info {
    background-color: rgba(74, 174, 220, 0.15);
    border: 1px solid rgba(74, 174, 220, 0.3);
    color: #4AAEDC;
}

/* Linked Accounts Section (Account Settings) */
.linked-accounts-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--card-bg, rgba(0,0,0,0.3));
    border-radius: 8px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.linked-accounts-section h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary, #fff);
    font-size: 18px;
}

.linked-accounts-section > p {
    color: var(--text-secondary, #aaa);
    margin: 0 0 20px 0;
    font-size: 14px;
}

.linked-account-row {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    border-radius: 6px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    transition: all 0.2s ease;
}

.linked-account-row:hover {
    background: var(--bg-hover, rgba(255,255,255,0.08));
}

.linked-account-row.linked {
    border-left: 3px solid #28a745;
}

.linked-account-icon {
    font-size: 28px;
    width: 45px;
    text-align: center;
    flex-shrink: 0;
}

.linked-account-info {
    flex: 1;
    margin-left: 15px;
    min-width: 0;
}

.linked-account-info strong {
    display: block;
    color: var(--text-primary, #fff);
    font-size: 15px;
}

.linked-account-info .oauth-username {
    display: block;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.primary-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 500;
    background: #28a745;
    color: #fff;
    border-radius: 10px;
    vertical-align: middle;
}

.linked-account-action {
    flex-shrink: 0;
    margin-left: 15px;
}

.linked-account-action .btn-link-oauth,
.linked-account-action .btn-unlink {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-link-oauth {
    background: var(--primary-color, #4AAEDC);
    color: #fff;
    border: none;
}

.btn-link-oauth:hover {
    background: var(--primary-hover, #3a9ecc);
    color: #fff;
    text-decoration: none;
}

.btn-unlink {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.btn-unlink:hover {
    background: #dc3545;
    color: #fff;
}

.btn-unlink:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* OAuth Registration Info Box */
.oauth-register-info {
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    border: 1px solid var(--primary-color, #4AAEDC);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.oauth-register-info p {
    margin: 0 0 15px 0;
    color: var(--text-primary, #fff);
}

.oauth-register-info .oauth-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 10px auto;
    display: block;
    border: 3px solid var(--primary-color, #4AAEDC);
}

.oauth-register-info .oauth-display-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 10px 0 5px 0;
}

.oauth-register-info .oauth-email {
    font-size: 14px;
    color: var(--text-secondary, #aaa);
}

/* Set Password Section (for OAuth-only users) */
.set-password-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-warning, rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
}

.set-password-section h4 {
    margin: 0 0 10px 0;
    color: #ffc107;
}

.set-password-section p {
    margin: 0 0 15px 0;
    color: var(--text-secondary, #aaa);
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .oauth-buttons {
        max-width: 100%;
    }

    .oauth-btn {
        padding: 14px 15px;
    }

    .linked-account-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .linked-account-action {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .linked-account-action .btn-link-oauth,
    .linked-account-action .btn-unlink {
        width: 100%;
        text-align: center;
    }
}
